summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederick Yin <fkfd@fkfd.me>2022-09-03 22:28:56 +0800
committerFrederick Yin <fkfd@fkfd.me>2022-09-03 22:28:56 +0800
commitf9b25acb6c792741978964459b216092725a651e (patch)
tree3f90eb71b9d6625cb23c7d1e2403e82c8ffca919
parent0d97490392bf52ae5091b0e5df6b91f75edb4ed7 (diff)
vimrc: 3 more plugins
-rw-r--r--.vimrc20
1 files changed, 16 insertions, 4 deletions
diff --git a/.vimrc b/.vimrc
index c9283c0..e09116e 100644
--- a/.vimrc
+++ b/.vimrc
@@ -13,10 +13,13 @@ Plugin 'VundleVim/Vundle.vim'
" Keep Plugin commands between vundle#begin/end.
" Coding
Plugin 'dense-analysis/ale'
+Plugin 'jiangmiao/auto-pairs'
+Plugin 'Shougo/deoplete.nvim'
+Plugin 'preservim/nerdcommenter'
Plugin 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
Plugin 'nvim-lua/plenary.nvim'
Plugin 'nvim-telescope/telescope.nvim'
-Plugin 'Shougo/deoplete.nvim'
+Plugin 'tpope/vim-surround'
" File types
Plugin 'peterhoeg/vim-qml'
Plugin 'lervag/vimtex'
@@ -52,8 +55,10 @@ set splitright splitbelow
set foldmethod=indent foldlevel=99
+autocmd BufRead,BufNewFile *.qml setfiletype qml
+
set tabstop=4 softtabstop=4 shiftwidth=4 noexpandtab
-autocmd FileType json,toml,yaml,html set ts=2 sw=2 sts=2 expandtab
+autocmd FileType json,toml,yaml,html set ts=2 sw=2 sts=2 noexpandtab
autocmd FileType python set ts=4 sw=4 sts=4 expandtab
autocmd FileType c,cpp,asm set ts=8 sw=8 sts=8 noexpandtab
set autoindent smartindent
@@ -84,6 +89,15 @@ nnoremap <leader>fh :Telescope help_tags<CR>
let g:deoplete#enable_at_startup = 1
nnoremap <leader>d :call deoplete#toggle()<CR>
+" NERDCommenter
+let g:NERDCreateDefaultMappings = 1
+let g:NERDSpaceDelims = 1
+let g:NERDCompactSexyComs = 1
+let g:NERDCustomDelimiters = { 'c': { 'left': '/*','right': '*/' } }
+let g:NERDCommentEmptyLines = 1
+let g:NERDTrimTrailingWhitespace = 1
+let g:NERDToggleCheckAllLines = 1
+
" vimtex
let g:vimtex_view_general_viewer = 'okular'
let g:vimtex_view_general_options = '--unique file:@pdf\#src:@line@tex'
@@ -106,8 +120,6 @@ augroup pencil
autocmd FileType text call pencil#init()
augroup END
-autocmd BufRead,BufNewFile *.qml setfiletype qml
-
" vim-workspace
nnoremap <leader>s :ToggleWorkspace<CR>
let g:workspace_session_directory = $HOME . '/.vim/sessions/'