diff options
author | gxlin <[email protected]> | 2021-06-14 15:34:09 +0800 |
---|---|---|
committer | gxlin <[email protected]> | 2021-06-14 15:34:09 +0800 |
commit | a3c1649a195cf87db6581b5a8c703fa867462210 (patch) | |
tree | 060c7afc070f0affd382273519382243675e190a /.vim | |
parent | 77af1ea1165d678a0b3953c43eaf7ddfc262ef68 (diff) | |
download | dotfiles-a3c1649a195cf87db6581b5a8c703fa867462210.tar.gz dotfiles-a3c1649a195cf87db6581b5a8c703fa867462210.tar.bz2 dotfiles-a3c1649a195cf87db6581b5a8c703fa867462210.zip |
more config
Diffstat (limited to '.vim')
-rw-r--r-- | .vim/keybindings.vim | 10 | ||||
-rw-r--r-- | .vim/plugins/fugitive.vim | 4 | ||||
-rw-r--r-- | .vim/plugins/vimwiki.vim | 3 |
3 files changed, 17 insertions, 0 deletions
diff --git a/.vim/keybindings.vim b/.vim/keybindings.vim index 7a68992..b76eb27 100644 --- a/.vim/keybindings.vim +++ b/.vim/keybindings.vim @@ -43,3 +43,13 @@ function! s:split_line_text_at_cursor() let text_before_cursor = (col('.') > 1) ? line_text[: col('.')-2] : '' return [text_before_cursor, text_after_cursor] endfunction + +function! s:toggle_quickfix() + if empty(filter(getwininfo(), 'v:val.quickfix')) + copen + else + cclose + endif +endfunction + +nnoremap <silent> <leader>c :call s:toggle_quickfix()<cr> diff --git a/.vim/plugins/fugitive.vim b/.vim/plugins/fugitive.vim new file mode 100644 index 0000000..8029fc3 --- /dev/null +++ b/.vim/plugins/fugitive.vim @@ -0,0 +1,4 @@ +Plug 'tpope/vim-fugitive' + +nnoremap <silent> <leader>gl :Gclog! -- %<CR> +nnoremap <silent> <leader>gd :Gdiffsplit <CR> diff --git a/.vim/plugins/vimwiki.vim b/.vim/plugins/vimwiki.vim index f2930e4..cba8593 100644 --- a/.vim/plugins/vimwiki.vim +++ b/.vim/plugins/vimwiki.vim @@ -4,3 +4,6 @@ let g:vimwiki_list = [{'path': '~/Documents/notes', \ 'syntax': 'markdown', 'ext': '.md'}] au FileType vimwiki setlocal textwidth=72 + +let g:vimwiki_CJK_length = 1 +let g:vimwiki_url_maxsave = 0 |