Vim: Group as much as possible
This commit is contained in:
52
.vim/vimrc
52
.vim/vimrc
@@ -98,6 +98,10 @@ Plugin 'mhinz/vim-startify'
|
||||
|
||||
call vundle#end() " required
|
||||
|
||||
" Packages {{{
|
||||
packadd termdebug
|
||||
" }}}
|
||||
|
||||
filetype plugin indent on
|
||||
|
||||
" }}}
|
||||
@@ -124,10 +128,6 @@ set hidden
|
||||
"set visualbell
|
||||
set nowrapscan
|
||||
|
||||
" }}}
|
||||
|
||||
" Vim draw options {{{
|
||||
|
||||
set cursorline
|
||||
set ttyfast
|
||||
set lazyredraw
|
||||
@@ -162,13 +162,18 @@ set smartcase
|
||||
set gdefault
|
||||
set hlsearch
|
||||
set incsearch
|
||||
nnoremap <leader><space> :nohlsearch<cr>
|
||||
|
||||
" }}}
|
||||
|
||||
set shell=/bin/bash
|
||||
set path+=**
|
||||
packadd termdebug
|
||||
set updatetime=100
|
||||
set nospell
|
||||
set runtimepath+=/usr/share/vim/vimfiles
|
||||
set spelllang=en
|
||||
" Dictionary path, from which the words are being looked up.
|
||||
set dictionary+=/usr/share/dict/words
|
||||
set clipboard=unnamed
|
||||
|
||||
" }}}
|
||||
|
||||
" Undofile {{{
|
||||
|
||||
@@ -188,9 +193,8 @@ if isdirectory($HOME . '/.vim/tags') == 0
|
||||
endif
|
||||
let g:gutentags_cache_dir='~/.vim/tags'
|
||||
"let g:gutentags_ctags_extra_args=['--fields=+l']
|
||||
|
||||
" }}}
|
||||
"
|
||||
|
||||
" Mappings {{{
|
||||
" Editing {{{
|
||||
"Changing Leader Key
|
||||
@@ -237,6 +241,13 @@ set pastetoggle=<F3>
|
||||
""nnoremap <leader>W :%s/\s\+$//<cr>:let @/=''<CR>
|
||||
|
||||
tnoremap <Esc> <C-W><C-W>
|
||||
|
||||
nnoremap S :%s//g<LEFT><LEFT>
|
||||
xnoremap S :s//g<LEFT><LEFT>
|
||||
xmap <BS> x
|
||||
|
||||
nnoremap <leader><space> :nohlsearch<cr>
|
||||
|
||||
" }}}
|
||||
" Plugins {{{
|
||||
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
|
||||
@@ -291,11 +302,6 @@ let NERDTreeIgnore=['\.vim$', '\~$', '\.pyc$']
|
||||
" Tagbar key bindings."
|
||||
"nmap <leader>t :TlistToggle<cr>
|
||||
|
||||
" ctrlp configuration
|
||||
"let g:ctrlp_map = '<c-p>'
|
||||
"let g:ctrlp_cmd = 'CtrlPLastMode'
|
||||
"let g:ctrlp_user_command = 'ack --cpp --cc --hh --hpp -f %s'
|
||||
"let g:ctrlp_working_path_mode = 'rw'
|
||||
nnoremap <leader>fl :Lines<CR>
|
||||
nnoremap <leader>fb :Buffers<CR>
|
||||
inoremap <leader>fs <ESC>:Snippets<CR>
|
||||
@@ -306,8 +312,6 @@ nnoremap <leader>ff :FZF<CR>
|
||||
" }}}
|
||||
" }}}
|
||||
|
||||
set clipboard=unnamed
|
||||
|
||||
" Wildmenu completion {{{
|
||||
set wildmenu
|
||||
set wildmode=list:longest
|
||||
@@ -355,6 +359,7 @@ let g:miniBufExplStatusLineText = ''
|
||||
"set colorcolumn=120
|
||||
"call matchadd('ColorColumn', '\%80v', 100)
|
||||
|
||||
" autocmd {{{
|
||||
if has("autocmd")
|
||||
"restore cursor position
|
||||
autocmd BufReadPost * if line("'\"") > 0|if line("'\"") <= line("$")|exe("norm '\"")|else|exe "norm $"|endif|endif
|
||||
@@ -372,6 +377,7 @@ if has("autocmd")
|
||||
" If you want to show the nearest function in your statusline automatically
|
||||
autocmd VimEnter * call vista#RunForNearestMethodOrFunction()
|
||||
endif
|
||||
"}}}
|
||||
|
||||
" Folding {{{
|
||||
function! FoldFormat()
|
||||
@@ -390,14 +396,6 @@ endif
|
||||
|
||||
" }}}
|
||||
|
||||
set updatetime=100
|
||||
|
||||
set nospell
|
||||
set runtimepath+=/usr/share/vim/vimfiles
|
||||
set spelllang=en
|
||||
" Dictionary path, from which the words are being looked up.
|
||||
set dictionary+=/usr/share/dict/words
|
||||
|
||||
function! FindAlternate()
|
||||
let l:ext = 'h'
|
||||
let l:curr_ext = expand('%:e')
|
||||
@@ -425,7 +423,7 @@ setglobal virtualedit=block
|
||||
setglobal shiftround
|
||||
|
||||
set shortmess+=c
|
||||
"inoremap <silent><expr> <leader><space> coc#refresh()
|
||||
inoremap <silent><expr> <leader><space> coc#refresh()
|
||||
set signcolumn=yes
|
||||
set cmdheight=2
|
||||
"inoremap <silent><expr> <TAB>
|
||||
@@ -449,7 +447,7 @@ endfunction
|
||||
|
||||
autocmd CursorHold * silent call CocActionAsync('highlight')
|
||||
|
||||
hi None ctermbg=None ctermfg=None
|
||||
"hi None ctermbg=None ctermfg=None
|
||||
|
||||
let g:vim_search_pulse_mode = 'pattern'
|
||||
let g:vim_search_pulse_duration = 400
|
||||
|
||||
Reference in New Issue
Block a user