1
0
mirror of https://github.com/jdhao/nvim-config.git synced 2025-06-08 14:14:33 +02:00

remove redundant fold marks

This commit is contained in:
jdhao 2021-10-31 15:42:38 +08:00
parent 05c0ef1d60
commit 5ae2c7d1e0
6 changed files with 4 additions and 46 deletions

View File

@ -1,4 +1,3 @@
"{ Auto commands
" Do not use smart case in command line mode, extracted from https://vi.stackexchange.com/a/16511/15292. " 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!
@ -104,4 +103,3 @@ augroup packer_auto_compile
autocmd! autocmd!
autocmd BufWritePost */nvim/lua/plugins.lua source <afile> | PackerCompile autocmd BufWritePost */nvim/lua/plugins.lua source <afile> | PackerCompile
augroup END augroup END
"}

View File

@ -1,5 +1,4 @@
"{ Global Variable "{ Global Variable
"{{ Custom variables "{{ Custom variables
let g:is_win = (has('win32') || has('win64')) ? v:true : v:false let g:is_win = (has('win32') || has('win64')) ? v:true : v:false
let g:is_linux = (has('unix') && !has('macunix')) ? v:true : v:false let g:is_linux = (has('unix') && !has('macunix')) ? v:true : v:false

View File

@ -1,4 +1,3 @@
"{ Custom key mappings
" Save key strokes (now we do not need to press shift to enter command mode). " Save key strokes (now we do not need to press shift to enter command mode).
" Vim-sneak has also mapped `;`, so using the below mapping will break the map " Vim-sneak has also mapped `;`, so using the below mapping will break the map
" used by vim-sneak " used by vim-sneak
@ -180,4 +179,3 @@ nnoremap J mzJ`z
for ch in [',', '.', '!', '?', ';', ':'] for ch in [',', '.', '!', '?', ';', ':']
execute printf('inoremap %s %s<C-g>u', ch, ch) execute printf('inoremap %s %s<C-g>u', ch, ch)
endfor endfor
"}

View File

@ -1,6 +1,5 @@
scriptencoding utf-8 scriptencoding utf-8
"{ Builtin options and settings
" change fillchars for folding, vertical split, end of buffer, and message separator " change fillchars for folding, vertical split, end of buffer, and message separator
set fillchars=fold:\ ,vert:\│,eob:\ ,msgsep:‾ set fillchars=fold:\ ,vert:\│,eob:\ ,msgsep:‾
@ -182,4 +181,3 @@ set diffopt+=filler " show filler for deleted lines
set diffopt+=closeoff " turn off diff when one file window is closed set diffopt+=closeoff " turn off diff when one file window is closed
set diffopt+=context:3 " context for diff set diffopt+=context:3 " context for diff
set diffopt+=internal,indent-heuristic,algorithm:histogram set diffopt+=internal,indent-heuristic,algorithm:histogram
"}

View File

@ -3,19 +3,15 @@ scriptencoding utf-8
" Plugin specification and lua stuff " Plugin specification and lua stuff
lua require('lua-init') lua require('lua-init')
"{ Plugin settings " Use short names for common plugin manager commands to simplify typing.
"{{ Vim-plug settings " To use these shortcuts: first activate command line with `:`, then input the
" Use shortnames for common vim-plug command to reduce typing. " short alias, e.g., `pi`, then press <space>, the alias will be expanded to
" To use these shortcut: first activate command line with `:`, then input the " the full command automatically.
" short alias, e.g., `pi`, then press <space>, the alias will be expanded
" to the full command automatically
call utils#Cabbrev('pi', 'PackerInstall') call utils#Cabbrev('pi', 'PackerInstall')
call utils#Cabbrev('pud', 'PackerUpdate') call utils#Cabbrev('pud', 'PackerUpdate')
call utils#Cabbrev('pc', 'PackerClean') call utils#Cabbrev('pc', 'PackerClean')
call utils#Cabbrev('ps', 'PackerSync') call utils#Cabbrev('ps', 'PackerSync')
"}}
"{{ Auto-completion related
"""""""""""""""""""""""""UltiSnips settings""""""""""""""""""" """""""""""""""""""""""""UltiSnips settings"""""""""""""""""""
" Trigger configuration. Do not use <tab> if you use YouCompleteMe " Trigger configuration. Do not use <tab> if you use YouCompleteMe
let g:UltiSnipsExpandTrigger='<c-j>' let g:UltiSnipsExpandTrigger='<c-j>'
@ -30,9 +26,7 @@ let g:UltiSnipsJumpBackwardTrigger='<c-k>'
" Configuration for custom snippets directory, see " Configuration for custom snippets directory, see
" https://jdhao.github.io/2019/04/17/neovim_snippet_s1/ for details. " https://jdhao.github.io/2019/04/17/neovim_snippet_s1/ for details.
let g:UltiSnipsSnippetDirectories=['UltiSnips', 'my_snippets'] let g:UltiSnipsSnippetDirectories=['UltiSnips', 'my_snippets']
"}}
"{{ Language specific plugin
"""""""""""""""""""""""""" semshi settings """"""""""""""""""""""""""""""" """""""""""""""""""""""""" semshi settings """""""""""""""""""""""""""""""
" Do not highlight for all occurrences of variable under cursor " Do not highlight for all occurrences of variable under cursor
let g:semshi#mark_selected_nodes=0 let g:semshi#mark_selected_nodes=0
@ -43,9 +37,6 @@ let g:semshi#error_sign=v:false
"""""""""""""""""""""""""" vlime settings """""""""""""""""""""""""""""""" """""""""""""""""""""""""" vlime settings """"""""""""""""""""""""""""""""
command! -nargs=0 StartVlime call jobstart(printf("sbcl --load %s/vlime/lisp/start-vlime.lisp", g:package_home)) command! -nargs=0 StartVlime call jobstart(printf("sbcl --load %s/vlime/lisp/start-vlime.lisp", g:package_home))
"}}
"{{ Search related
""""""""""""""""""""""""""""" settings for nvim-hlslens""""""""""""""" """"""""""""""""""""""""""""" settings for nvim-hlslens"""""""""""""""
noremap <silent> n <Cmd>execute('normal! ' . v:count1 . 'nzzzv')<CR> noremap <silent> n <Cmd>execute('normal! ' . v:count1 . 'nzzzv')<CR>
\<Cmd>lua require('hlslens').start()<CR> \<Cmd>lua require('hlslens').start()<CR>
@ -119,9 +110,7 @@ let g:Lf_PopupColorscheme = 'gruvbox_material'
" Change keybinding in LeaderF prompt mode, use ctrl-n and ctrl-p to navigate " Change keybinding in LeaderF prompt mode, use ctrl-n and ctrl-p to navigate
" items. " items.
let g:Lf_CommandMap = {'<C-J>': ['<C-N>'], '<C-K>': ['<C-P>']} let g:Lf_CommandMap = {'<C-J>': ['<C-N>'], '<C-K>': ['<C-P>']}
"}}
"{{ URL related
""""""""""""""""""""""""""""open-browser.vim settings""""""""""""""""""" """"""""""""""""""""""""""""open-browser.vim settings"""""""""""""""""""
if g:is_win || g:is_mac if g:is_win || g:is_mac
" Disable netrw's gx mapping. " Disable netrw's gx mapping.
@ -131,9 +120,7 @@ if g:is_win || g:is_mac
nmap ob <Plug>(openbrowser-smart-search) nmap ob <Plug>(openbrowser-smart-search)
xmap ob <Plug>(openbrowser-smart-search) xmap ob <Plug>(openbrowser-smart-search)
endif endif
"}}
"{{ Navigation and tags
""""""""""""""""""""""""""" gutentags settings """""""""""""""""""""""""""""" """"""""""""""""""""""""""" gutentags settings """"""""""""""""""""""""""""""
" The path to store tags files, instead of in the project root. " The path to store tags files, instead of in the project root.
let g:gutentags_cache_dir = stdpath('cache') . '/ctags' let g:gutentags_cache_dir = stdpath('cache') . '/ctags'
@ -153,9 +140,7 @@ let g:vista_echo_cursor = 0
let g:vista_stay_on_open = 0 let g:vista_stay_on_open = 0
nnoremap <silent> <Space>t :<C-U>Vista!!<CR> nnoremap <silent> <Space>t :<C-U>Vista!!<CR>
"}}
"{{ File editing
""""""""""""""""""""""""vim-mundo settings""""""""""""""""""""""" """"""""""""""""""""""""vim-mundo settings"""""""""""""""""""""""
let g:mundo_verbose_graph = 0 let g:mundo_verbose_graph = 0
let g:mundo_width = 80 let g:mundo_width = 80
@ -192,9 +177,7 @@ let g:better_escape_interval = 200
""""""""""""""""""""""""""""vim-xkbswitch settings""""""""""""""""""""""""" """"""""""""""""""""""""""""vim-xkbswitch settings"""""""""""""""""""""""""
let g:XkbSwitchEnabled = 1 let g:XkbSwitchEnabled = 1
"}}
"{{ Linting and formatting
"""""""""""""""""""""""""""""" neoformat settings """"""""""""""""""""""" """""""""""""""""""""""""""""" neoformat settings """""""""""""""""""""""
let g:neoformat_enabled_python = ['black', 'yapf'] let g:neoformat_enabled_python = ['black', 'yapf']
let g:neoformat_cpp_clangformat = { let g:neoformat_cpp_clangformat = {
@ -208,9 +191,7 @@ let g:neoformat_c_clangformat = {
let g:neoformat_enabled_cpp = ['clangformat'] let g:neoformat_enabled_cpp = ['clangformat']
let g:neoformat_enabled_c = ['clangformat'] let g:neoformat_enabled_c = ['clangformat']
"}}
"{{ Git-related
"""""""""""""""""""""""""vim-signify settings"""""""""""""""""""""""""""""" """""""""""""""""""""""""vim-signify settings""""""""""""""""""""""""""""""
" The VCS to use " The VCS to use
let g:signify_vcs_list = [ 'git' ] let g:signify_vcs_list = [ 'git' ]
@ -225,9 +206,7 @@ nnoremap <silent> <leader>gc :Git commit<CR>
nnoremap <silent> <leader>gpl :Git pull<CR> nnoremap <silent> <leader>gpl :Git pull<CR>
" Note that to use bar literally, we need backslash it, see also `:h :bar`. " Note that to use bar literally, we need backslash it, see also `:h :bar`.
nnoremap <silent> <leader>gpu :15split \| term git push nnoremap <silent> <leader>gpu :15split \| term git push
"}}
"{{ Markdown writing
"""""""""""""""""""""""""plasticboy/vim-markdown settings""""""""""""""""""" """""""""""""""""""""""""plasticboy/vim-markdown settings"""""""""""""""""""
" Disable header folding " Disable header folding
let g:vim_markdown_folding_disabled = 1 let g:vim_markdown_folding_disabled = 1
@ -282,16 +261,12 @@ endif
""""""""""""""""""""""""unicode.vim settings"""""""""""""""""""""""""""""" """"""""""""""""""""""""unicode.vim settings""""""""""""""""""""""""""""""
nmap ga <Plug>(UnicodeGA) nmap ga <Plug>(UnicodeGA)
"}}
"{{ text objects
""""""""""""""""""""""""""""vim-sandwich settings""""""""""""""""""""""""""""" """"""""""""""""""""""""""""vim-sandwich settings"""""""""""""""""""""""""""""
" Map s to nop since s in used by vim-sandwich. Use cl instead of s. " Map s to nop since s in used by vim-sandwich. Use cl instead of s.
nmap s <Nop> nmap s <Nop>
omap s <Nop> omap s <Nop>
"}}
"{{ LaTeX editing
""""""""""""""""""""""""""""vimtex settings""""""""""""""""""""""""""""" """"""""""""""""""""""""""""vimtex settings"""""""""""""""""""""""""""""
if ( g:is_win || g:is_mac ) && executable('latex') if ( g:is_win || g:is_mac ) && executable('latex')
" Hacks for inverse serach to work semi-automatically, " Hacks for inverse serach to work semi-automatically,
@ -354,9 +329,7 @@ if ( g:is_win || g:is_mac ) && executable('latex')
endfunction endfunction
endif endif
endif endif
"}}
"{{ UI: Status line, look
"""""""""""""""""""""""""""vim-airline setting"""""""""""""""""""""""""""""" """""""""""""""""""""""""""vim-airline setting""""""""""""""""""""""""""""""
" Set airline theme to a random one if it exists " Set airline theme to a random one if it exists
let s:candidate_airlinetheme = ['ayu_mirage', 'lucius', 'ayu_dark', 'base16_bright', let s:candidate_airlinetheme = ['ayu_mirage', 'lucius', 'ayu_dark', 'base16_bright',
@ -413,9 +386,7 @@ let g:airline#extensions#xkblayout#short_codes = {'0': 'CN', '1': 'US'}
" Do not change working directory when opening files. " Do not change working directory when opening files.
let g:startify_change_to_dir = 0 let g:startify_change_to_dir = 0
let g:startify_fortune_use_unicode = 1 let g:startify_fortune_use_unicode = 1
"}}
"{{ Misc plugin setting
""""""""""""""""""""""""""""vim-matchup settings""""""""""""""""""""""""""""" """"""""""""""""""""""""""""vim-matchup settings"""""""""""""""""""""""""""""
" Improve performance " Improve performance
let g:matchup_matchparen_deferred = 1 let g:matchup_matchparen_deferred = 1
@ -519,5 +490,3 @@ function! s:wilder_init() abort
echohl Error |echomsg "Wilder.nvim missing. Run :PackerInstall to install all plugins."|echohl None echohl Error |echomsg "Wilder.nvim missing. Run :PackerInstall to install all plugins."|echohl None
endtry endtry
endfunction endfunction
"}}
"}

View File

@ -1,5 +1,3 @@
"{ UI-related settings
"{{ Colorscheme settings
let s:my_theme_dict = {} let s:my_theme_dict = {}
function! s:my_theme_dict.gruvbox8() dict abort function! s:my_theme_dict.gruvbox8() dict abort
@ -94,5 +92,3 @@ else
let s:msg = "Invalid colorscheme function: " . s:colorscheme_func let s:msg = "Invalid colorscheme function: " . s:colorscheme_func
call v:lua.vim.notify(s:msg, 'error', {'title': 'nvim-config'}) call v:lua.vim.notify(s:msg, 'error', {'title': 'nvim-config'})
endif endif
"}}
"}