vim: wrap au with group
This commit is contained in:
parent
17ab57f18a
commit
8c3bb42a35
37
.vimrc
37
.vimrc
@ -99,17 +99,16 @@ augroup vimStartup
|
|||||||
\ exe "normal! g`\"" |
|
\ exe "normal! g`\"" |
|
||||||
\ endif
|
\ endif
|
||||||
|
|
||||||
augroup END
|
|
||||||
|
|
||||||
" command line history
|
|
||||||
set history=1000
|
|
||||||
set tabpagemax=50
|
|
||||||
|
|
||||||
" Check that file have not been changed
|
" Check that file have not been changed
|
||||||
" CursorHold : after cursor move
|
" CursorHold : after cursor move
|
||||||
" WinEnter or BufWinEnter
|
" WinEnter or BufWinEnter
|
||||||
au WinEnter * checktime
|
au WinEnter * checktime
|
||||||
au BufWinEnter * checktime
|
au BufWinEnter * checktime
|
||||||
|
augroup END
|
||||||
|
|
||||||
|
" command line history
|
||||||
|
set history=1000
|
||||||
|
set tabpagemax=50
|
||||||
|
|
||||||
"""""""""
|
"""""""""
|
||||||
" INPUT "
|
" INPUT "
|
||||||
@ -188,7 +187,7 @@ set shiftwidth=8
|
|||||||
|
|
||||||
|
|
||||||
"filetype specific action
|
"filetype specific action
|
||||||
if has("autocmd")
|
augroup IrisPython
|
||||||
au Filetype markdown set tabstop=4 shiftwidth=4 softtabstop=4
|
au Filetype markdown set tabstop=4 shiftwidth=4 softtabstop=4
|
||||||
au BufRead,BufNewFile *.iris set ft=python
|
au BufRead,BufNewFile *.iris set ft=python
|
||||||
au BufRead,BufNewFile *.ino set tabstop=4 shiftwidth=4 softtabstop=4
|
au BufRead,BufNewFile *.ino set tabstop=4 shiftwidth=4 softtabstop=4
|
||||||
@ -204,8 +203,7 @@ if has("autocmd")
|
|||||||
autocmd Filetype python set equalprg=autopep8\ -
|
autocmd Filetype python set equalprg=autopep8\ -
|
||||||
iab sefl self
|
iab sefl self
|
||||||
iab slef self
|
iab slef self
|
||||||
|
augroup END
|
||||||
endif
|
|
||||||
|
|
||||||
" vim -b : edit binary using xxd-format!
|
" vim -b : edit binary using xxd-format!
|
||||||
augroup Binary
|
augroup Binary
|
||||||
@ -230,7 +228,9 @@ fu DetectIndent()
|
|||||||
endfu
|
endfu
|
||||||
|
|
||||||
" detect indentation see http://www.freehackers.org/Indent_Finder
|
" detect indentation see http://www.freehackers.org/Indent_Finder
|
||||||
|
augroup IndentFind
|
||||||
autocmd BufReadPost /* call DetectIndent()
|
autocmd BufReadPost /* call DetectIndent()
|
||||||
|
augroup END
|
||||||
|
|
||||||
noremap <C-K> :py3f ~/.vim/syntax/clang-format.py<CR>
|
noremap <C-K> :py3f ~/.vim/syntax/clang-format.py<CR>
|
||||||
inoremap <C-K> <ESC>:py3f ~/.vim/syntax/clang-format.py<CR>i
|
inoremap <C-K> <ESC>:py3f ~/.vim/syntax/clang-format.py<CR>i
|
||||||
@ -282,10 +282,10 @@ nmap <F8> :TagbarToggle<CR>
|
|||||||
|
|
||||||
|
|
||||||
" close preview window after a completion
|
" close preview window after a completion
|
||||||
if has("autocmd")
|
augroup AutoCompletion
|
||||||
autocmd CursorMovedI *.{[hc],cpp} if pumvisible() == 0|pclose|endif
|
autocmd CursorMovedI *.{[hc],cpp} if pumvisible() == 0|pclose|endif
|
||||||
autocmd InsertLeave *.{[hc],cpp} if pumvisible() == 0|pclose|endif
|
autocmd InsertLeave *.{[hc],cpp} if pumvisible() == 0|pclose|endif
|
||||||
endif
|
augroup END
|
||||||
|
|
||||||
function! TagInNewTab()
|
function! TagInNewTab()
|
||||||
let word = expand("<cword>")
|
let word = expand("<cword>")
|
||||||
@ -342,9 +342,9 @@ if bufwinnr(1)
|
|||||||
imap <C-Up> <ESC><C-Up>a
|
imap <C-Up> <ESC><C-Up>a
|
||||||
endif
|
endif
|
||||||
" open automatically quickfix window
|
" open automatically quickfix window
|
||||||
if has("autocmd")
|
augroup QuickFix
|
||||||
autocmd QuickFixCmdPost * cw
|
autocmd QuickFixCmdPost * cw
|
||||||
endif
|
augroup END
|
||||||
|
|
||||||
" open a file in the same directory as the current file with F2 and split with shift+F2
|
" open a file in the same directory as the current file with F2 and split with shift+F2
|
||||||
map <F2> :tabe <C-R>=expand("%:h") . "/"<CR>
|
map <F2> :tabe <C-R>=expand("%:h") . "/"<CR>
|
||||||
@ -459,8 +459,10 @@ cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' <bar> edit!
|
|||||||
"""""""""""
|
"""""""""""
|
||||||
" NerdTree
|
" NerdTree
|
||||||
"""""""""""
|
"""""""""""
|
||||||
|
augroup NerdGroup
|
||||||
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
|
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
|
||||||
map <F9> :NERDTreeToggle<CR>
|
map <F9> :NERDTreeToggle<CR>
|
||||||
|
augroup END
|
||||||
|
|
||||||
"""""""""""
|
"""""""""""
|
||||||
" GitGutter
|
" GitGutter
|
||||||
@ -653,7 +655,9 @@ if v:version >= 800
|
|||||||
nmap <C-F1> <Plug>(lcn-menu)
|
nmap <C-F1> <Plug>(lcn-menu)
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
augroup LSP
|
||||||
autocmd FileType * call LC_maps()
|
autocmd FileType * call LC_maps()
|
||||||
|
augroup END
|
||||||
else
|
else
|
||||||
"Syntax checking | Install flake8 or pylint for python
|
"Syntax checking | Install flake8 or pylint for python
|
||||||
" Install shellcheck for bash
|
" Install shellcheck for bash
|
||||||
@ -717,8 +721,10 @@ Plugin 'rhysd/vim-grammarous'
|
|||||||
|
|
||||||
Plugin 'junegunn/goyo.vim'
|
Plugin 'junegunn/goyo.vim'
|
||||||
Plugin 'junegunn/limelight.vim'
|
Plugin 'junegunn/limelight.vim'
|
||||||
|
augroup LimeGroup
|
||||||
autocmd! User GoyoEnter Limelight
|
autocmd! User GoyoEnter Limelight
|
||||||
autocmd! User GoyoLeave Limelight!
|
autocmd! User GoyoLeave Limelight!
|
||||||
|
augroup END
|
||||||
|
|
||||||
"Complete delimiters
|
"Complete delimiters
|
||||||
Plugin 'Raimondi/delimitMate.git'
|
Plugin 'Raimondi/delimitMate.git'
|
||||||
@ -756,8 +762,9 @@ let g:tex_conceal='abdmg'
|
|||||||
let g:polyglot_disabled = ['latex']
|
let g:polyglot_disabled = ['latex']
|
||||||
|
|
||||||
" Visual incrementation. increment in block with ctrl-A
|
" Visual incrementation. increment in block with ctrl-A
|
||||||
Plugin 'triglav/vim-visual-increment'
|
"-> use g ctr-a instead
|
||||||
set nrformats=alpha,octal,hex
|
"Plugin 'triglav/vim-visual-increment'
|
||||||
|
"set nrformats=alpha,octal,hex
|
||||||
|
|
||||||
Plugin 'christoomey/vim-tmux-navigator'
|
Plugin 'christoomey/vim-tmux-navigator'
|
||||||
let g:tmux_navigator_no_mappings=1
|
let g:tmux_navigator_no_mappings=1
|
||||||
|
Loading…
Reference in New Issue
Block a user