aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkatherine <ageha@airen-no-jikken.icu>2021-08-04 02:05:37 -0700
committerkatherine <ageha@airen-no-jikken.icu>2021-08-04 02:05:37 -0700
commitc9cc7537223f45f21a66528f7b9349cbcaea3f0f (patch)
tree65f9978d19a417d510015564af4689c771f6501f
parentd03d85e65bc7fe22515ec72fbc83902445f05a1e (diff)
downloaddotfiles-c9cc7537223f45f21a66528f7b9349cbcaea3f0f.tar.gz
vimrc bufflist with nomore
-rw-r--r--.vimrc27
1 files changed, 24 insertions, 3 deletions
diff --git a/.vimrc b/.vimrc
index 4db2b7c..05d9726 100644
--- a/.vimrc
+++ b/.vimrc
@@ -222,7 +222,18 @@ nnoremap fr zR
"buffer-handling
nnoremap <C-j> :bn<CR>
nnoremap <C-k> :bp<CR>
-nnoremap <C-g> :buffers<CR>:b<Space>
+
+fun! s:bufflist()
+ if &more
+ set nomore
+ execute "buffers"
+ set more
+ elseif
+ execute "buffers"
+ endif
+endfun
+
+nnoremap <C-g> :call <SID>bufflist()<CR>:b<Space>
"copy words from above and below the cursor
inoremap <expr> <C-y> pumvisible() ? "\<C-y>" : matchstr(getline(line('.')-1), '\%' . virtcol('.') . 'v\%(\k\+\\|.\)')
@@ -278,13 +289,12 @@ if has('autocmd')
au FileType css call <SID>settings_css()
au FileType d call <SID>settings_c()
au FileType elixir call <SID>settings_elixir()
- au FileType javascript call <SID>settings_c()
- au FileType tex call <SID>settings_tex()
au FileType go call <SID>settings_c()
au FileType haskell call <SID>settings_haskell()
au FileType html call <SID>settings_html()
au FileType xhtml call <SID>settings_html()
au FileType ia64 call <SID>settings_ia64()
+ au FileType javascript call <SID>settings_javascript()
au FileType make call <SID>settings_script()
au FileType mail call <SID>settings_mail()
au FileType markdown call <SID>settings_markdown()
@@ -300,6 +310,7 @@ if has('autocmd')
au FileType rust call <SID>settings_rust()
au FileType scss call <SID>settings_css()
au FileType sh call <SID>settings_script()
+ au FileType tex call <SID>settings_tex()
au FileType text call <SID>settings_text()
au FileType vim call <SID>settings_vim()
au FileType yaml call <SID>settings_script2()
@@ -450,6 +461,16 @@ fun! s:settings_ia64()
nnoremap <buffer> -_ O<Space>*/<Esc>hhi/*<Space>
endfun
+fun! s:settings_javascript()
+ call <SID>settings_c()
+ "settings
+ setlocal shiftwidth=2
+ setlocal tabstop=2
+ setlocal softtabstop=2
+ setlocal expandtab
+ "mappings
+endfun
+
fun! s:settings_markdown()
"settings
setlocal shiftwidth=4