mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
28 lines
1.1 KiB
VimL
28 lines
1.1 KiB
VimL
" Disable inserting comment leader after hitting o or O or <Enter>
|
|
set formatoptions-=o
|
|
set formatoptions-=r
|
|
|
|
" Set the folding related options for vim script. Setting folding option in
|
|
" modeline is annoying in that the modeline get executed each time the window
|
|
" focus is lost (see
|
|
" https://github.com/tmux-plugins/vim-tmux-focus-events/issues/14)
|
|
set foldmethod=expr foldlevel=0 foldlevelstart=-1
|
|
\ foldexpr=utils#VimFolds(v:lnum) foldtext=utils#MyFoldText()
|
|
|
|
" Use :help command for keyword when pressing `K` in vim file,
|
|
" see `:h K` and https://stackoverflow.com/q/15867323/6064933
|
|
set keywordprg=:help
|
|
|
|
set tabstop=2 " number of visual spaces per TAB
|
|
set softtabstop=2 " number of spaces in tab when editing
|
|
set shiftwidth=2 " number of spaces to use for autoindent
|
|
set expandtab " expand tab to spaces so that tabs are spaces
|
|
|
|
" Only define following variable if Auto-pairs plugin is used
|
|
if match(&runtimepath, 'auto-pairs') != -1
|
|
let b:AutoPairs = AutoPairsDefine({'<' : '>'})
|
|
|
|
" Do not use `"` for vim script since `"` is also used for comment
|
|
let b:AutoPairs = {'(':')', '[':']', '{':'}', "'":"'", '`':'`', '<':'>'}
|
|
endif
|