mirror of
https://github.com/jdhao/nvim-config.git
synced 2025-06-08 14:14:33 +02:00
chore: remove short url and replace with true url
This commit is contained in:
parent
823e09f5b6
commit
1b97735bf2
@ -4,14 +4,15 @@ set formatoptions-=o
|
|||||||
" Disable inserting comment leader after hitting <Enter> in insert mode
|
" Disable inserting comment leader after hitting <Enter> in insert mode
|
||||||
set formatoptions-=r
|
set formatoptions-=r
|
||||||
|
|
||||||
" Set the folding related options for vim script. Setting folding option
|
" Set the folding related options for vim script. Setting folding option in
|
||||||
" in modeline is annoying in that the modeline get executed each time the
|
" modeline is annoying in that the modeline get executed each time the window
|
||||||
" window focus is lost (see http://tinyurl.com/yyqyyhnc)
|
" focus is lost (see
|
||||||
|
" https://github.com/tmux-plugins/vim-tmux-focus-events/issues/14)
|
||||||
set foldmethod=expr foldlevel=0 foldlevelstart=-1
|
set foldmethod=expr foldlevel=0 foldlevelstart=-1
|
||||||
\ foldexpr=utils#VimFolds(v:lnum) foldtext=utils#MyFoldText()
|
\ foldexpr=utils#VimFolds(v:lnum) foldtext=utils#MyFoldText()
|
||||||
|
|
||||||
" Use :help command for keyword when pressing `K` in vim file,
|
" Use :help command for keyword when pressing `K` in vim file,
|
||||||
" see `:h K` and https://bre.is/wC3Ih-26u
|
" see `:h K` and https://stackoverflow.com/q/15867323/6064933
|
||||||
set keywordprg=:help
|
set keywordprg=:help
|
||||||
|
|
||||||
" Only define following variable if Auto-pairs plugin is used
|
" Only define following variable if Auto-pairs plugin is used
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
"{ Auto commands
|
"{ Auto commands
|
||||||
" Do not use smart case in command line mode, extracted from https://goo.gl/vCTYdK.
|
" Do not use smart case in command line mode, extracted from https://vi.stackexchange.com/a/16511/15292.
|
||||||
augroup dynamic_smartcase
|
augroup dynamic_smartcase
|
||||||
autocmd!
|
autocmd!
|
||||||
autocmd CmdLineEnter : set nosmartcase
|
autocmd CmdLineEnter : set nosmartcase
|
||||||
@ -41,7 +41,8 @@ augroup END
|
|||||||
" Automatically reload the file if it is changed outside of Nvim, see
|
" Automatically reload the file if it is changed outside of Nvim, see
|
||||||
" https://unix.stackexchange.com/a/383044/221410. It seems that `checktime`
|
" https://unix.stackexchange.com/a/383044/221410. It seems that `checktime`
|
||||||
" command does not work in command line. We need to check if we are in command
|
" command does not work in command line. We need to check if we are in command
|
||||||
" line before executing this command. See also http://tinyurl.com/y6av4sy9.
|
" line before executing this command. See also
|
||||||
|
" https://vi.stackexchange.com/a/20397/15292.
|
||||||
augroup auto_read
|
augroup auto_read
|
||||||
autocmd!
|
autocmd!
|
||||||
autocmd FocusGained,BufEnter,CursorHold,CursorHoldI *
|
autocmd FocusGained,BufEnter,CursorHold,CursorHoldI *
|
||||||
|
|||||||
@ -6,7 +6,7 @@ function utils#StripTrailingWhitespaces() abort
|
|||||||
call winrestview(l:save)
|
call winrestview(l:save)
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" Create command alias safely, see https://bit.ly/2ImFOpL.
|
" Create command alias safely, see https://stackoverflow.com/q/3878692/6064933
|
||||||
" The following two functions are taken from answer below on SO:
|
" The following two functions are taken from answer below on SO:
|
||||||
" https://stackoverflow.com/a/10708687/6064933
|
" https://stackoverflow.com/a/10708687/6064933
|
||||||
function! utils#Cabbrev(key, value) abort
|
function! utils#Cabbrev(key, value) abort
|
||||||
@ -18,8 +18,9 @@ function! s:Single_quote(str) abort
|
|||||||
return "'" . substitute(copy(a:str), "'", "''", 'g') . "'"
|
return "'" . substitute(copy(a:str), "'", "''", 'g') . "'"
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" Check the syntax group in the current cursor position,
|
" Check the syntax group in the current cursor position, see
|
||||||
" see http://tinyurl.com/yyzgswxz and http://tinyurl.com/y3lxozey
|
" https://stackoverflow.com/q/9464844/6064933 and
|
||||||
|
" https://jordanelver.co.uk/blog/2015/05/27/working-with-vim-colorschemes/
|
||||||
function! utils#SynGroup() abort
|
function! utils#SynGroup() abort
|
||||||
if !exists('*synstack')
|
if !exists('*synstack')
|
||||||
return
|
return
|
||||||
|
|||||||
2
init.vim
2
init.vim
@ -10,7 +10,7 @@
|
|||||||
" "
|
" "
|
||||||
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
" The above ASCII art is generated using service provided in this webpage:
|
" The above ASCII art is generated using service provided in this webpage:
|
||||||
" http://tinyurl.com/y6szckgd.
|
" https://www.kammerl.de/ascii/AsciiSignature.php.
|
||||||
|
|
||||||
"{ Header and Licence
|
"{ Header and Licence
|
||||||
"{{ header info
|
"{{ header info
|
||||||
|
|||||||
28
mappings.vim
28
mappings.vim
@ -40,17 +40,17 @@ nnoremap [Q :cfirst<CR>zv
|
|||||||
nnoremap ]Q :clast<CR>zv
|
nnoremap ]Q :clast<CR>zv
|
||||||
|
|
||||||
" Close location list or quickfix list if they are present,
|
" Close location list or quickfix list if they are present,
|
||||||
" see https://goo.gl/uXncnS
|
" see https://superuser.com/q/355325/736190
|
||||||
nnoremap<silent> \x :windo lclose <bar> cclose<CR>
|
nnoremap<silent> \x :windo lclose <bar> cclose<CR>
|
||||||
|
|
||||||
" Close a buffer and switching to another buffer, do not close the
|
" Close a buffer and switching to another buffer, do not close the
|
||||||
" window, see https://goo.gl/Wd8yZJ
|
" window, see https://stackoverflow.com/q/4465095/6064933
|
||||||
nnoremap <silent> \d :bprevious <bar> bdelete #<CR>
|
nnoremap <silent> \d :bprevious <bar> bdelete #<CR>
|
||||||
|
|
||||||
" Toggle search highlight, see https://goo.gl/3H85hh
|
" Toggle search highlight, see https://stackoverflow.com/a/26504944/6064933
|
||||||
nnoremap <silent><expr> <Leader>hl (&hls && v:hlsearch ? ':nohls' : ':set hls')."\n"
|
nnoremap <silent><expr> <Leader>hl (&hls && v:hlsearch ? ':nohls' : ':set hls')."\n"
|
||||||
|
|
||||||
" Disable arrow key in vim, see https://goo.gl/s1yfh4.
|
" Disable arrow key in vim, see https://superuser.com/q/599150/736190
|
||||||
nnoremap <Up> <nop>
|
nnoremap <Up> <nop>
|
||||||
nnoremap <Down> <nop>
|
nnoremap <Down> <nop>
|
||||||
nnoremap <Left> <nop>
|
nnoremap <Left> <nop>
|
||||||
@ -87,7 +87,7 @@ nnoremap <silent> ^ g^
|
|||||||
nnoremap <silent> 0 g0
|
nnoremap <silent> 0 g0
|
||||||
|
|
||||||
" Do not include white space characters when using $ in visual mode,
|
" Do not include white space characters when using $ in visual mode,
|
||||||
" see https://goo.gl/PkuZox
|
" see https://vi.stackexchange.com/q/12607/15292
|
||||||
xnoremap $ g_
|
xnoremap $ g_
|
||||||
|
|
||||||
" Jump to matching pairs easily in normal mode
|
" Jump to matching pairs easily in normal mode
|
||||||
@ -100,8 +100,9 @@ nnoremap L g_
|
|||||||
xnoremap L g_
|
xnoremap L g_
|
||||||
|
|
||||||
" Resize windows using <Alt> and h,j,k,l, inspiration from
|
" Resize windows using <Alt> and h,j,k,l, inspiration from
|
||||||
" https://goo.gl/vVQebo (bottom page).
|
" https://vim.fandom.com/wiki/Fast_window_resizing_with_plus/minus_keys
|
||||||
" If you enable mouse support, shorcuts below may not be necessary.
|
" (bottom page). If you enable mouse support, shorcuts below may not be
|
||||||
|
" necessary.
|
||||||
nnoremap <silent> <M-h> <C-w><
|
nnoremap <silent> <M-h> <C-w><
|
||||||
nnoremap <silent> <M-l> <C-w>>
|
nnoremap <silent> <M-l> <C-w>>
|
||||||
nnoremap <silent> <M-j> <C-W>-
|
nnoremap <silent> <M-j> <C-W>-
|
||||||
@ -115,13 +116,14 @@ nnoremap <silent> <M-down> <C-w>j
|
|||||||
nnoremap <silent> <M-up> <C-w>k
|
nnoremap <silent> <M-up> <C-w>k
|
||||||
|
|
||||||
" Continuous visual shifting (does not exit Visual mode), `gv` means
|
" Continuous visual shifting (does not exit Visual mode), `gv` means
|
||||||
" to reselect previous visual area, see https://goo.gl/m1UeiT
|
" to reselect previous visual area, see https://superuser.com/q/310417/736190
|
||||||
xnoremap < <gv
|
xnoremap < <gv
|
||||||
xnoremap > >gv
|
xnoremap > >gv
|
||||||
|
|
||||||
" When completion menu is shown, use <cr> to select an item
|
" When completion menu is shown, use <cr> to select an item and do not add an
|
||||||
" and do not add an annoying newline. Otherwise, <enter> is what it is.
|
" annoying newline. Otherwise, <enter> is what it is. For more info , see
|
||||||
" For more info , see https://goo.gl/KTHtrr and https://goo.gl/MH7w3b
|
" https://superuser.com/a/941082/736190 and
|
||||||
|
" https://unix.stackexchange.com/q/162528/221410
|
||||||
inoremap <expr> <cr> ((pumvisible())?("\<C-Y>"):("\<cr>"))
|
inoremap <expr> <cr> ((pumvisible())?("\<C-Y>"):("\<cr>"))
|
||||||
" Use <esc> to close auto-completion menu
|
" Use <esc> to close auto-completion menu
|
||||||
inoremap <expr> <esc> ((pumvisible())?("\<C-e>"):("\<esc>"))
|
inoremap <expr> <esc> ((pumvisible())?("\<C-e>"):("\<esc>"))
|
||||||
@ -156,8 +158,8 @@ inoremap <silent> <F11> <C-O>:set spell! <bar> :AutoSaveToggle<cr>
|
|||||||
" Decrease indent level in insert mode with shift+tab
|
" Decrease indent level in insert mode with shift+tab
|
||||||
inoremap <S-Tab> <ESC><<i
|
inoremap <S-Tab> <ESC><<i
|
||||||
|
|
||||||
" Change text without putting the text into register,
|
" Change text without putting it into the vim register,
|
||||||
" see http://tinyurl.com/y2ap4h69
|
" see https://stackoverflow.com/q/54255/6064933
|
||||||
nnoremap c "_c
|
nnoremap c "_c
|
||||||
nnoremap C "_C
|
nnoremap C "_C
|
||||||
nnoremap cc "_cc
|
nnoremap cc "_cc
|
||||||
|
|||||||
24
options.vim
24
options.vim
@ -10,17 +10,17 @@ set pastetoggle=<F12>
|
|||||||
set splitbelow splitright
|
set splitbelow splitright
|
||||||
|
|
||||||
" Time in milliseconds to wait for a mapped sequence to complete,
|
" Time in milliseconds to wait for a mapped sequence to complete,
|
||||||
" see https://goo.gl/vHvyu8 for more info
|
" see https://unix.stackexchange.com/q/36882/221410 for more info
|
||||||
set timeoutlen=1000
|
set timeoutlen=1000
|
||||||
|
|
||||||
" For CursorHold events
|
" For CursorHold events
|
||||||
set updatetime=2000
|
set updatetime=2000
|
||||||
|
|
||||||
" Clipboard settings, always use clipboard for all delete, yank, change, put
|
" Clipboard settings, always use clipboard for all delete, yank, change, put
|
||||||
" operation, see https://goo.gl/YAHBbJ
|
" operation, see https://stackoverflow.com/q/30691466/6064933
|
||||||
set clipboard+=unnamedplus
|
set clipboard+=unnamedplus
|
||||||
|
|
||||||
" Disable creating swapfiles, see https://goo.gl/FA6m6h
|
" Disable creating swapfiles, see https://stackoverflow.com/q/821902/6064933
|
||||||
set noswapfile
|
set noswapfile
|
||||||
|
|
||||||
" Set up backup directory
|
" Set up backup directory
|
||||||
@ -62,7 +62,7 @@ set wildmode=list:full
|
|||||||
|
|
||||||
" Show current line where the cursor is
|
" Show current line where the cursor is
|
||||||
set cursorline
|
set cursorline
|
||||||
" Set a ruler at column 80, see https://goo.gl/vEkF5i
|
" Set a ruler at column 80, see https://stackoverflow.com/q/2447109/6064933
|
||||||
set colorcolumn=80
|
set colorcolumn=80
|
||||||
|
|
||||||
" Minimum lines to keep above and below cursor when scrolling
|
" Minimum lines to keep above and below cursor when scrolling
|
||||||
@ -106,10 +106,10 @@ set list listchars=tab:▸\ ,extends:❯,precedes:❮,nbsp:+
|
|||||||
" Auto-write the file based on some condition
|
" Auto-write the file based on some condition
|
||||||
set autowrite
|
set autowrite
|
||||||
|
|
||||||
" Show hostname, full path of file and last-mod time on the window title.
|
" Show hostname, full path of file and last-mod time on the window title. The
|
||||||
" The meaning of the format str for strftime can be found in
|
" meaning of the format str for strftime can be found in
|
||||||
" http://tinyurl.com/l9nuj4a. The function to get lastmod time is drawn from
|
" http://man7.org/linux/man-pages/man3/strftime.3.html. The function to get
|
||||||
" http://tinyurl.com/yxd23vo8
|
" lastmod time is drawn from https://stackoverflow.com/q/8426736/6064933
|
||||||
set title
|
set title
|
||||||
set titlestring=
|
set titlestring=
|
||||||
set titlestring+=%(%{hostname()}\ \ %)
|
set titlestring+=%(%{hostname()}\ \ %)
|
||||||
@ -141,21 +141,21 @@ set spelllang=en,cjk " Spell languages
|
|||||||
set spellsuggest+=10 " The number of suggestions shown in the screen for z=
|
set spellsuggest+=10 " The number of suggestions shown in the screen for z=
|
||||||
|
|
||||||
" Align indent to next multiple value of shiftwidth. For its meaning,
|
" Align indent to next multiple value of shiftwidth. For its meaning,
|
||||||
" see http://tinyurl.com/y5n87a6m
|
" see http://vim.1045645.n5.nabble.com/shiftround-option-td5712100.html
|
||||||
set shiftround
|
set shiftround
|
||||||
|
|
||||||
" Virtual edit is useful for visual block edit
|
" Virtual edit is useful for visual block edit
|
||||||
set virtualedit=block
|
set virtualedit=block
|
||||||
|
|
||||||
" Correctly break multi-byte characters such as CJK,
|
" Correctly break multi-byte characters such as CJK,
|
||||||
" see http://tinyurl.com/y4sq6vf3
|
" see https://stackoverflow.com/q/32669814/6064933
|
||||||
set formatoptions+=mM
|
set formatoptions+=mM
|
||||||
|
|
||||||
" Tilde (~) is an operator, thus must be followed by motions like `e` or `w`.
|
" Tilde (~) is an operator, thus must be followed by motions like `e` or `w`.
|
||||||
set tildeop
|
set tildeop
|
||||||
|
|
||||||
" Do not add two space after a period when joining lines or formatting texts,
|
" Do not add two spaces after a period when joining lines or formatting texts,
|
||||||
" see https://tinyurl.com/y3yy9kov
|
" see https://stackoverflow.com/q/4760428/6064933
|
||||||
set nojoinspaces
|
set nojoinspaces
|
||||||
|
|
||||||
" Text after this column number is not highlighted
|
" Text after this column number is not highlighted
|
||||||
|
|||||||
34
plugins.vim
34
plugins.vim
@ -1,9 +1,10 @@
|
|||||||
"{ Plugin installation
|
"{ Plugin installation
|
||||||
"{{ Vim-plug Install and related settings
|
"{{ Vim-plug Install and related settings
|
||||||
|
|
||||||
" Auto-install vim-plug on different systems if it does not exist.
|
" Auto-install vim-plug on different systems if it does not exist. For
|
||||||
" For Windows, only Windows 10 with curl installed are supported (after
|
" Windows, only Windows 10 with curl installed are supported (after Windows 10
|
||||||
" Windows 10 build 17063, source: http://tinyurl.com/y23972tt).
|
" build 17063, source:
|
||||||
|
" https://devblogs.microsoft.com/commandline/tar-and-curl-come-to-windows/).
|
||||||
" The following script to install vim-plug is adapted from vim-plug
|
" The following script to install vim-plug is adapted from vim-plug
|
||||||
" wiki: https://github.com/junegunn/vim-plug/wiki/tips#tips
|
" wiki: https://github.com/junegunn/vim-plug/wiki/tips#tips
|
||||||
let g:VIM_PLUG_PATH = expand(g:nvim_config_root . '/autoload/plug.vim')
|
let g:VIM_PLUG_PATH = expand(g:nvim_config_root . '/autoload/plug.vim')
|
||||||
@ -160,7 +161,7 @@ Plug '907th/vim-auto-save'
|
|||||||
" graphcial undo history, see https://github.com/mbbill/undotree
|
" graphcial undo history, see https://github.com/mbbill/undotree
|
||||||
Plug 'mbbill/undotree'
|
Plug 'mbbill/undotree'
|
||||||
|
|
||||||
" another plugin to show undo history is: http://tinyurl.com/jlsgjy5
|
" another plugin to show undo history
|
||||||
" Plug 'simnalamburt/vim-mundo'
|
" Plug 'simnalamburt/vim-mundo'
|
||||||
|
|
||||||
" Manage your yank history
|
" Manage your yank history
|
||||||
@ -263,7 +264,7 @@ Plug 'michaeljsmith/vim-indent-object'
|
|||||||
if ( g:is_win || g:is_mac ) && executable('latex')
|
if ( g:is_win || g:is_mac ) && executable('latex')
|
||||||
" vimtex use autoload feature of Vim, so it is not necessary to use `for`
|
" vimtex use autoload feature of Vim, so it is not necessary to use `for`
|
||||||
" keyword of vim-plug to try to lazy-load it,
|
" keyword of vim-plug to try to lazy-load it,
|
||||||
" see http://tinyurl.com/y3ymc4qd
|
" see https://github.com/junegunn/vim-plug/issues/785
|
||||||
Plug 'lervag/vimtex'
|
Plug 'lervag/vimtex'
|
||||||
|
|
||||||
" Plug 'matze/vim-tex-fold', {'for': 'tex'}
|
" Plug 'matze/vim-tex-fold', {'for': 'tex'}
|
||||||
@ -276,7 +277,8 @@ endif
|
|||||||
" for Linux and Mac
|
" for Linux and Mac
|
||||||
if (g:is_linux || g:is_mac) && executable('tmux')
|
if (g:is_linux || g:is_mac) && executable('tmux')
|
||||||
" Let vim detect tmux focus event correctly, see
|
" Let vim detect tmux focus event correctly, see
|
||||||
" http://tinyurl.com/y4xd2w3r and http://tinyurl.com/y4878wwm
|
" https://github.com/neovim/neovim/issues/9486 and
|
||||||
|
" https://vi.stackexchange.com/q/18515/15292
|
||||||
Plug 'tmux-plugins/vim-tmux-focus-events'
|
Plug 'tmux-plugins/vim-tmux-focus-events'
|
||||||
|
|
||||||
" .tmux.conf syntax highlighting and setting check
|
" .tmux.conf syntax highlighting and setting check
|
||||||
@ -343,8 +345,7 @@ let g:deoplete#enable_at_startup = 1
|
|||||||
" Maximum candidate window width
|
" Maximum candidate window width
|
||||||
call deoplete#custom#source('_', 'max_menu_width', 80)
|
call deoplete#custom#source('_', 'max_menu_width', 80)
|
||||||
|
|
||||||
" Minimum character length needed to activate auto-completion,
|
" Minimum character length needed to activate auto-completion.
|
||||||
" see https://goo.gl/QP9am2
|
|
||||||
call deoplete#custom#source('_', 'min_pattern_length', 1)
|
call deoplete#custom#source('_', 'min_pattern_length', 1)
|
||||||
|
|
||||||
" Whether to disable completion for certain syntax
|
" Whether to disable completion for certain syntax
|
||||||
@ -375,10 +376,10 @@ call deoplete#custom#option('auto_complete_delay', 100)
|
|||||||
call deoplete#custom#option('auto_complete', v:true)
|
call deoplete#custom#option('auto_complete', v:true)
|
||||||
|
|
||||||
" Automatically close function preview windows after completion
|
" Automatically close function preview windows after completion
|
||||||
" see https://goo.gl/Bn5n39
|
" see https://github.com/Shougo/deoplete.nvim/issues/115.
|
||||||
" autocmd InsertLeave,CompleteDone * if pumvisible() == 0 | pclose | endif
|
" autocmd InsertLeave,CompleteDone * if pumvisible() == 0 | pclose | endif
|
||||||
|
|
||||||
" Tab-complete, see https://goo.gl/LvwZZY
|
" Tab-complete, see https://vi.stackexchange.com/q/19675/15292.
|
||||||
" inoremap <expr> <tab> pumvisible() ? "\<c-n>" : "\<tab>"
|
" inoremap <expr> <tab> pumvisible() ? "\<c-n>" : "\<tab>"
|
||||||
|
|
||||||
"""""""""""""""""""""""""UltiSnips settings"""""""""""""""""""
|
"""""""""""""""""""""""""UltiSnips settings"""""""""""""""""""
|
||||||
@ -397,11 +398,12 @@ let g:UltiSnipsSnippetDirectories=['UltiSnips', 'my_snippets']
|
|||||||
" Auto-close method preview window
|
" Auto-close method preview window
|
||||||
let g:SuperTabClosePreviewOnPopupClose = 1
|
let g:SuperTabClosePreviewOnPopupClose = 1
|
||||||
|
|
||||||
" Use the default top to bottom way for scroll, see https://goo.gl/APdo9V
|
" Use the default top to bottom way for scroll, see
|
||||||
|
" https://github.com/ervandew/supertab#frequently-asked-questions
|
||||||
let g:SuperTabDefaultCompletionType = '<c-n>'
|
let g:SuperTabDefaultCompletionType = '<c-n>'
|
||||||
|
|
||||||
" Shortcut to navigate forward and backward in completion menu,
|
" Shortcut to navigate forward and backward in completion menu,
|
||||||
" see https://is.gd/AoSv4m
|
" see https://github.com/ervandew/supertab/blob/master/doc/supertab.txt#L280
|
||||||
let g:SuperTabMappingForward = '<tab>'
|
let g:SuperTabMappingForward = '<tab>'
|
||||||
let g:SuperTabMappingBackward = '<s-tab>'
|
let g:SuperTabMappingBackward = '<s-tab>'
|
||||||
"}}
|
"}}
|
||||||
@ -501,11 +503,11 @@ endif
|
|||||||
"{{ Navigation and tags
|
"{{ Navigation and tags
|
||||||
""""""""""""""""""""""" nerdtree settings """"""""""""""""""""""""""
|
""""""""""""""""""""""" nerdtree settings """"""""""""""""""""""""""
|
||||||
" Toggle nerdtree window and keep cursor in file window,
|
" Toggle nerdtree window and keep cursor in file window,
|
||||||
" adapted from http://tinyurl.com/y2kt8cy9
|
" adapted from https://stackoverflow.com/q/24808932/6064933
|
||||||
nnoremap <silent> <Space>s :NERDTreeToggle<CR>:wincmd p<CR>
|
nnoremap <silent> <Space>s :NERDTreeToggle<CR>:wincmd p<CR>
|
||||||
|
|
||||||
" Reveal currently editted file in nerdtree widnow,
|
" Reveal currently editted file in nerdtree widnow,
|
||||||
" see https://goo.gl/kbxDVK
|
" see https://stackoverflow.com/q/7692233/6064933
|
||||||
nnoremap <silent> <Space>f :NERDTreeFind<CR>
|
nnoremap <silent> <Space>f :NERDTreeFind<CR>
|
||||||
|
|
||||||
" Ignore certain files and folders
|
" Ignore certain files and folders
|
||||||
@ -514,7 +516,7 @@ let NERDTreeIgnore = ['\.pyc$', '^__pycache__$']
|
|||||||
" Automatically show nerdtree window on entering nvim,
|
" Automatically show nerdtree window on entering nvim,
|
||||||
" see https://github.com/scrooloose/nerdtree. But now the cursor
|
" see https://github.com/scrooloose/nerdtree. But now the cursor
|
||||||
" is in nerdtree window, so we need to change it to the file window,
|
" is in nerdtree window, so we need to change it to the file window,
|
||||||
" extracted from https://goo.gl/vumpvo
|
" extracted from https://stackoverflow.com/q/24808932/6064933
|
||||||
" autocmd VimEnter * NERDTree | wincmd l
|
" autocmd VimEnter * NERDTree | wincmd l
|
||||||
|
|
||||||
" Delete a file buffer when you have deleted it in nerdtree
|
" Delete a file buffer when you have deleted it in nerdtree
|
||||||
@ -795,7 +797,7 @@ let g:airline#extensions#tagbar#enabled = 1
|
|||||||
" extracted from https://vi.stackexchange.com/a/9637/15292
|
" extracted from https://vi.stackexchange.com/a/9637/15292
|
||||||
let g:airline_skip_empty_sections = 1
|
let g:airline_skip_empty_sections = 1
|
||||||
|
|
||||||
" Whether to use powerline symbols, see https://goo.gl/XLY19H.
|
" Whether to use powerline symbols, see https://vi.stackexchange.com/q/3359/15292
|
||||||
let g:airline_powerline_fonts = 0
|
let g:airline_powerline_fonts = 0
|
||||||
|
|
||||||
if !exists('g:airline_symbols')
|
if !exists('g:airline_symbols')
|
||||||
|
|||||||
7
ui.vim
7
ui.vim
@ -1,8 +1,9 @@
|
|||||||
"{ UI-related settings
|
"{ UI-related settings
|
||||||
"{{ General settings about colors
|
"{{ General settings about colors
|
||||||
" Enable true colors support. Do not use this option if your terminal does not
|
" Enable true colors support. Do not set this option if your terminal does not
|
||||||
" support true colors! For a comprehensive list of terminals supporting true
|
" support true colors! For a comprehensive list of terminals supporting true
|
||||||
" colors, see https://github.com/termstandard/colors and https://bit.ly/2InF97t.
|
" colors, see https://github.com/termstandard/colors and
|
||||||
|
" https://gist.github.com/XVilka/8346728.
|
||||||
if $TERM == "xterm-256color" || exists('g:started_by_firenvim')
|
if $TERM == "xterm-256color" || exists('g:started_by_firenvim')
|
||||||
set termguicolors
|
set termguicolors
|
||||||
endif
|
endif
|
||||||
@ -16,7 +17,7 @@ set background=dark
|
|||||||
" error message when starting Nvim
|
" error message when starting Nvim
|
||||||
if utils#HasColorscheme('gruvbox8')
|
if utils#HasColorscheme('gruvbox8')
|
||||||
" Italic options should be put before colorscheme setting,
|
" Italic options should be put before colorscheme setting,
|
||||||
" see https://goo.gl/8nXhcp
|
" see https://github.com/morhetz/gruvbox/wiki/Terminal-specific#1-italics-is-disabled
|
||||||
let g:gruvbox_italics=1
|
let g:gruvbox_italics=1
|
||||||
let g:gruvbox_italicize_strings=1
|
let g:gruvbox_italicize_strings=1
|
||||||
let g:gruvbox_filetype_hi_groups = 0
|
let g:gruvbox_filetype_hi_groups = 0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user