summaryrefslogtreecommitdiffstats
path: root/init.lua
blob: 2a8e1cc82fb632abe52d9691bf851d2049b90eb7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
require 'user'
require('feline').setup({preset = 'noicon'})

vim.cmd([[set mouse=]])
-- When editing a file, always jump to the last known cursor position.
-- Don't do it when the position is invalid or when inside an event handler
-- (happens when dropping a file on gvim).
vim.cmd[[
  autocmd BufReadPost *
    \ if line("'\"") > 0 && line("'\"") <= line("$") |
    \   exe "normal g`\"" |
    \ endif
]]

vim.cmd([[
  augroup CmpDebounceAuGroup
    au!
    au TextChangedI * lua require('user.debounce').debounce()
  augroup end
]])

vim.cmd([[
  let g:localvimrc_ask=0
  let g:localvimrc_sandbox=0
]])

-- UTF8 à tester
-- command! -nargs=* UTF8 call EncodeUTF8(<f-args>)
-- fun! EncodeUTF8(...)
--    let utf8str = ""
--    for i in a:000
--       let utf8str .= "\\x" . i
--    endfor
--    exe "norm i" . eval("\"".utf8str."\"")
-- endfun