From cf6bd83b9bc3f739c755516706d6702dc2567550 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Fri, 2 Oct 2020 18:55:35 +0200 Subject: Added keyrepeat, ti ignore node_modules --- .vimrc | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to '.vimrc') diff --git a/.vimrc b/.vimrc index 76dd3e9..fc58ac5 100644 --- a/.vimrc +++ b/.vimrc @@ -207,17 +207,15 @@ nnoremap q :call QuickfixToggle() nnoremap n :cnext nnoremap p :cprevious let g:quickfix_is_open = 0 -if !exists('*QuickfixToggle') - function QuickfixToggle() - if g:quickfix_is_open - cclose - let g:quickfix_is_open = 0 - else - copen - let g:quickfix_is_open = 1 - endif - endfunction -endif +function! QuickfixToggle() + if g:quickfix_is_open + cclose + let g:quickfix_is_open = 0 + else + copen + let g:quickfix_is_open = 1 + endif +endfunction " }}} " make {{{ -- cgit From 2d9e9f6dbc3bd820d314f5b8b0742ecfb512de7a Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Sun, 29 Nov 2020 00:06:11 +0100 Subject: Added newsboat max-items, vim ejs syntax --- .vimrc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to '.vimrc') diff --git a/.vimrc b/.vimrc index fc58ac5..804a4f7 100644 --- a/.vimrc +++ b/.vimrc @@ -190,9 +190,9 @@ autocmd Filetype cpp setlocal comments=s:/**,m:**,e:*/,s:/*,m:**,e:*/ " Put Coplien Form boilerplate class function PutCoplienFormFunc(name) let l:default_constructor = a:name . "();\n" - let l:copy_constructor = a:name . "(const " . a:name . "& other);\n" - let l:copy_operator = a:name . "& operator=(const " . a:name . "& other);\n" - let l:destructor = "~" . a:name . "();\n" + let l:copy_constructor = a:name . "(const " . a:name . "& other);\n" + let l:copy_operator = a:name . "& operator=(const " . a:name . "& other);\n" + let l:destructor = "~" . a:name . "();\n" execute "normal iclass " . a:name . "\n{\npublic:\n" . l:default_constructor . l:copy_constructor . l:copy_operator . l:destructor . "\nprivate:\n};\n" execute "normal <2{" @@ -249,7 +249,7 @@ autocmd FileType lisp set shiftwidth=2 " ctrlp {{{ " directory to ignore when searching in file tree -set wildignore=*/tmp/*,*.o,*.so,*.swp,*.zip,*/node_modules/*,*/vendor/*,.bundle/*,bin/*,.git/* +set wildignore=*/tmp/*,*.o,*.so,*.swp,*.zip,*/node_modules/*,*/vendor/*,.bundle/*,bin/*,.git/*,*.pyc " ctrlp ignore all stuff in the .gitignore let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files -co --exclude-standard'] let g:ctrlp_working_path_mode = 'rw' @@ -276,3 +276,5 @@ let g:ctrlp_mruf_case_sensitive = 0 xmap ga (EasyAlign) nmap ga (EasyAlign) " }}} + +let g:c_formatter_42_format_on_save=0 -- cgit From e43007e0e1b29cc94afc19fcbff0fd473bef63ba Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Sun, 6 Dec 2020 11:22:13 +0100 Subject: Added clipboard copy/paste in vim --- .vimrc | 3 +++ 1 file changed, 3 insertions(+) (limited to '.vimrc') diff --git a/.vimrc b/.vimrc index 804a4f7..c269fa6 100644 --- a/.vimrc +++ b/.vimrc @@ -277,4 +277,7 @@ xmap ga (EasyAlign) nmap ga (EasyAlign) " }}} +vnoremap c y:call system("xclip -selection clipboard", getreg("\"")) +nnoremap v :call setreg("\"", system("xclip -selection clipboard -o"))p + let g:c_formatter_42_format_on_save=0 -- cgit From ef554a4c34fde7b66c13bc97f8168e432353ed7c Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Mon, 7 Dec 2020 15:34:19 +0100 Subject: Added shiftwidth of 2 for html and css files --- .vimrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.vimrc') diff --git a/.vimrc b/.vimrc index c269fa6..37681a0 100644 --- a/.vimrc +++ b/.vimrc @@ -240,7 +240,7 @@ autocmd Filetype vim setlocal foldmethod=marker autocmd FileType haskell set formatprg=stylish-haskell -autocmd FileType lisp set shiftwidth=2 +autocmd FileType lisp,html,css set shiftwidth=2 " }}} """""""""""" -- cgit From a524b71f558dcdd4f050f3e3f8a1ad2eac7443bd Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Sun, 13 Dec 2020 11:16:29 +0100 Subject: Improving feedback on clone with project-open, Updated shiftwidth=2 widht setlocal instead of set to avoid poluting the other buffers, Updated newsboat video stream with mpv to enable going forward/backward --- .vimrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.vimrc') diff --git a/.vimrc b/.vimrc index 37681a0..89fb3e5 100644 --- a/.vimrc +++ b/.vimrc @@ -240,7 +240,7 @@ autocmd Filetype vim setlocal foldmethod=marker autocmd FileType haskell set formatprg=stylish-haskell -autocmd FileType lisp,html,css set shiftwidth=2 +autocmd FileType lisp,html,css setlocal shiftwidth=2 " }}} """""""""""" -- cgit From 3f43577b18d310e182b7d212fe1cfedc99dd9d28 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Wed, 30 Dec 2020 12:46:42 +0100 Subject: Added CountScopeLines in vimrc --- .vimrc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to '.vimrc') diff --git a/.vimrc b/.vimrc index 89fb3e5..a3a61a0 100644 --- a/.vimrc +++ b/.vimrc @@ -218,6 +218,20 @@ function! QuickfixToggle() endfunction " }}} +function! CountScopeLines() + normal! mq + execute '/^}' + let l:end_brace = line('.') + execute '?^{' + let l:start_brace = line('.') + normal! k + let l:scope_len = l:end_brace - l:start_brace - 1 + let l:scope_name = substitute(getline('.'), '\t', ' ', 'g') + echom l:scope_len . ' lines in |' . l:scope_name . '|' + normal! `q +endfunction +command! CountScopeLines call CountScopeLines() + " make {{{ nnoremap m :make all " }}} -- cgit From 5454deef3a0b00f55201135ce5a56112eb410ace Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Wed, 6 Jan 2021 10:42:03 +0100 Subject: Added tag search/generate in vim --- .vimrc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to '.vimrc') diff --git a/.vimrc b/.vimrc index a3a61a0..bb747ff 100644 --- a/.vimrc +++ b/.vimrc @@ -263,11 +263,13 @@ autocmd FileType lisp,html,css setlocal shiftwidth=2 " ctrlp {{{ " directory to ignore when searching in file tree -set wildignore=*/tmp/*,*.o,*.so,*.swp,*.zip,*/node_modules/*,*/vendor/*,.bundle/*,bin/*,.git/*,*.pyc +set wildignore=*/doc/*,*/tmp/*,*.o,*.so,*.a,*.swp,*.zip,*/node_modules/*,*/vendor/*,.bundle/*,bin/*,.git/*,*.pyc " ctrlp ignore all stuff in the .gitignore let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files -co --exclude-standard'] let g:ctrlp_working_path_mode = 'rw' let g:ctrlp_mruf_case_sensitive = 0 + +nnoremap p :CtrlPTag " }}} " quick-scope {{{ @@ -294,4 +296,7 @@ nmap ga (EasyAlign) vnoremap c y:call system("xclip -selection clipboard", getreg("\"")) nnoremap v :call setreg("\"", system("xclip -selection clipboard -o"))p -let g:c_formatter_42_format_on_save=0 +let g:c_formatter_42_format_on_save = 0 + +let g:gutentags_ctags_exclude = ['doc/*', 'Makefile'] +" let g:gutentags_ctags_exclude_wildignore = 1 -- cgit From 167ba112c710b9b1bc0a698dfdf50c874702ce29 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Wed, 6 Jan 2021 17:26:57 +0100 Subject: Added $DOTDIR variable check with default value --- .vimrc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to '.vimrc') diff --git a/.vimrc b/.vimrc index bb747ff..75c00f2 100644 --- a/.vimrc +++ b/.vimrc @@ -3,7 +3,11 @@ """""""""" " load pluggins {{{ -source $DOTDIR/.pluggins.vim +if exists("$DOTDIR") + source $DOTDIR/.pluggins.vim +else + source .pluggins.vim +endif " }}} """"""""""" -- cgit From 3ce48c4323f38d3b61a08e7e2add5543adabe5d7 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Thu, 7 Jan 2021 21:10:43 +0100 Subject: Added vim Goyo plugin, changed default browser to qutebrowser, Added keybinding to go to next/prev element of command completion in qutebrowser --- .vimrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.vimrc') diff --git a/.vimrc b/.vimrc index 75c00f2..7f59de6 100644 --- a/.vimrc +++ b/.vimrc @@ -166,7 +166,7 @@ nnoremap bl :ls " vimrc {{{ nnoremap rc :vsplit $DOTDIR/.vimrc -nnoremap src :source $MYVIMRC +nnoremap sc :source $MYVIMRC " }}} " c {{{ -- cgit