dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit 196084cbca27e02895199c1a6438557ea7fae027
parent a61660d9568e880d7b337276807625f6db3de601
Author: Alex Balgavy <a.balgavy@gmail.com>
Date:   Fri, 14 Jun 2019 21:50:56 +0200

Move filetype stuff out of autocmds


Former-commit-id: 513041258ae37666426a9d0afe9a2493ae68147e
Diffstat:
Avim/after/ftplugin/c.vim | 2++
Avim/after/ftplugin/gitcommit.vim | 3+++
Avim/after/ftplugin/markdown.vim | 10++++++++++
Avim/after/ftplugin/netrw.vim | 3+++
Avim/after/ftplugin/qf.vim | 2++
Avim/after/ftplugin/sh.vim | 2++
Avim/after/ftplugin/tagbar.vim | 2++
Avim/after/ftplugin/vim.vim | 2++
Avim/after/ftplugin/vimwiki.vim | 3+++
Mvim/autocmd.vimrc | 30------------------------------
10 files changed, 29 insertions(+), 30 deletions(-)

diff --git a/vim/after/ftplugin/c.vim b/vim/after/ftplugin/c.vim @@ -0,0 +1,2 @@ +nnoremap <leader>mm :silent make<CR>\|:redraw!<CR>\|:cwindow<CR> +nnoremap <leader>mc :silent make clean<CR>\|:redraw!<CR> diff --git a/vim/after/ftplugin/gitcommit.vim b/vim/after/ftplugin/gitcommit.vim @@ -0,0 +1,3 @@ +setlocal spell +setlocal spelllang=en +let b:undo_ftplugin = '|setlocal spell< spelllang<' diff --git a/vim/after/ftplugin/markdown.vim b/vim/after/ftplugin/markdown.vim @@ -0,0 +1,10 @@ +inoremap ;1 # +inoremap ;2 ## +inoremap ;3 ### +inoremap ;4 #### +inoremap ;5 ##### +inoremap ;6 ###### +setlocal makeprg=pandoc\ %\ -o\ %<.pdf +setlocal conceallevel=2 +setlocal wrap +let b:undo_ftplugin = '|setlocal makeprg< conceallevel< wrap <' diff --git a/vim/after/ftplugin/netrw.vim b/vim/after/ftplugin/netrw.vim @@ -0,0 +1,3 @@ +setlocal bufhidden=delete +nnoremap <buffer><silent> gn :<C-u>silent! call NetrwxSetTreetop()<CR> +let b:undo_ftplugin = '|setlocal bufhidden<' diff --git a/vim/after/ftplugin/qf.vim b/vim/after/ftplugin/qf.vim @@ -0,0 +1,2 @@ +setlocal nocursorline +let b:undo_ftplugin = '|setlocal nocursorline<' diff --git a/vim/after/ftplugin/sh.vim b/vim/after/ftplugin/sh.vim @@ -0,0 +1,2 @@ +setlocal makeprg=shellcheck\ -f\ gcc\ % +let b:undo_ftplugin = '|setlocal makeprg<' diff --git a/vim/after/ftplugin/tagbar.vim b/vim/after/ftplugin/tagbar.vim @@ -0,0 +1,2 @@ +setlocal nocursorline +let b:undo_ftplugin = '|setlocal nocursorline<' diff --git a/vim/after/ftplugin/vim.vim b/vim/after/ftplugin/vim.vim @@ -0,0 +1,2 @@ +setlocal keywordprg=:help +let b:undo_ftplugin = '|setlocal keywordprg<' diff --git a/vim/after/ftplugin/vimwiki.vim b/vim/after/ftplugin/vimwiki.vim @@ -0,0 +1,3 @@ +setlocal wrap shiftwidth=4 tabstop=4 softtabstop=4 breakindent breakindentopt=shift:3 +cabbrev table VimwikiTable +let b:undo_ftplugin = '|setlocal wrap< shiftwidth< tabstop< softtabstop< breakindent< breakindentopt<' diff --git a/vim/autocmd.vimrc b/vim/autocmd.vimrc @@ -1,42 +1,12 @@ augroup sets autocmd! autocmd BufRead,BufNewFile *.md setlocal conceallevel=2 - autocmd FileType markdown setlocal conceallevel=2 wrap - autocmd FileType vim setlocal keywordprg=:help - autocmd FileType vimwiki setlocal wrap shiftwidth=4 tabstop=4 softtabstop=4 breakindent breakindentopt=shift:3 | cabbrev table VimwikiTable - autocmd FileType tagbar setlocal nocursorline - autocmd FileType qf setlocal nocursorline autocmd InsertEnter * setlocal nocursorline autocmd InsertLeave * setlocal cursorline - autocmd FileType gitcommit setlocal spell spelllang=en -augroup END - -augroup insertmaps - autocmd! - autocmd FileType markdown inoremap ;1 # - autocmd FileType markdown inoremap ;2 ## - autocmd FileType markdown inoremap ;3 ### - autocmd FileType markdown inoremap ;4 #### - autocmd FileType markdown inoremap ;5 ##### - autocmd FileType markdown inoremap ;6 ###### augroup END augroup mappings autocmd! - autocmd FileType c nnoremap <leader>mm :silent make<CR>\|:redraw!<CR>\|:cwindow<CR> - autocmd FileType c nnoremap <leader>mc :silent make clean<CR>\|:redraw!<CR> autocmd BufEnter *.tex nnoremap <leader>tt :VimtexTocToggle<CR> autocmd BufLeave *.tex nnoremap <leader>tt :TagbarToggle<CR> augroup END - -augroup makeprgs - autocmd! - autocmd FileType markdown setlocal makeprg=pandoc\ %\ -o\ %<.pdf - autocmd FileType sh setlocal makeprg=shellcheck\ -f\ gcc\ % -augroup END - -augroup netrw - autocmd! - autocmd FileType netrw setl bufhidden=delete - autocmd FileType netrw nnoremap <buffer><silent> gn :<C-u>silent! call NetrwxSetTreetop()<CR> -augroup END