diff options
| author | Marc Vertes <mvertes@free.fr> | 2025-09-13 11:59:07 +0200 |
|---|---|---|
| committer | Marc Vertes <mvertes@free.fr> | 2025-09-13 11:59:07 +0200 |
| commit | cdb2f0fda7af95771cc24b4723d6d43b9e71d209 (patch) | |
| tree | 1e29410a122d042b8e7aed6ed83eec9c081d4dd4 | |
| parent | 002cc250e24d2da9477f71861b6cfc8652503b5c (diff) | |
update
| -rw-r--r-- | .bkignore | 1 | ||||
| -rw-r--r-- | .config/kitty/kitty.conf | 11 | ||||
| -rw-r--r-- | .nexrc | 20 | ||||
| -rwxr-xr-x | .vim/pack/mvertes/install.sh | 5 | ||||
| -rw-r--r-- | .vimrc | 124 |
5 files changed, 94 insertions, 67 deletions
@@ -16,6 +16,7 @@ Library/DuetExpertCenter Library/Suggestions Library/Trial Library/Weather +.cache caches Caches Cache diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf index 6236cf2..62dc588 100644 --- a/.config/kitty/kitty.conf +++ b/.config/kitty/kitty.conf @@ -25,7 +25,8 @@ # font_size 11.0 # font_family Fira Code -font_size 14.0 +font_family Fixed 6x13 +font_size 13.0 #: Font size (in pts) @@ -169,7 +170,7 @@ font_size 14.0 shell_integration no-cursor # cursor #cccccc -cursor #ff0000 +# cursor #ff0000 #: Default cursor color @@ -1518,3 +1519,9 @@ allow_remote_control yes #: }}} #: }}} + + +# BEGIN_KITTY_THEME +# Alabaster +include current-theme.conf +# END_KITTY_THEME @@ -4,10 +4,20 @@ set wrapscan set extended set iclower set noflash +set tabstop=4 +set shiftwidth=4 set filec= -" Edit the content of current word as a file -map ge yeopI:e! "add@a
-" Create an entry in tags for the current file -map gt :!echo '% % 1' >>tags; sort -o tags -Vu tags
+" set filec=\ +" set cedit=\ + " Open the long word under the cursor -map ,o "ayEo"apI:!open "add@a
+map go "ayEo"apI:!open "add@a
+ +" Jump to WikiWord and create files on the fly using tags +map gt mz"zyeo"zpA "zpA 1:.w!>>tags
:!LC_ALL=C sort -o tags -u tags
ddo"zpI:ta "zdd`z@z
+ +" Search next WikiWord +map gn /[A-Z][A-Za-z0-9_]+[A-Z]/
+ +" Jump to go identifier definition using dynamic tag. +map gd D:+1,$d
:1,$!wc -c
0cw:!gotag % "yddu..@y
:ta _
diff --git a/.vim/pack/mvertes/install.sh b/.vim/pack/mvertes/install.sh index 8843982..e9cfa0e 100755 --- a/.vim/pack/mvertes/install.sh +++ b/.vim/pack/mvertes/install.sh @@ -2,10 +2,11 @@ plugins=' git@github.com:junegunn/fzf.vim -#git@github.com:fatih/vim-go +git@github.com:fatih/vim-go git@github.com:mvertes/vimki -git@github.com:prabirshrestha/vim-lsp ' +# git@github.com:prabirshrestha/vim-lsp + ht='test -d doc && vim -c "helptags doc" -c "q"' mkdir -p start @@ -93,7 +93,7 @@ hi SpellBad gui=undercurl noremap <leader>n :bn<cr> noremap <leader><leader> :bd<cr> noremap <leader>o :!open <cWORD>&<cr><cr> -noremap <C-g> :tag <c-r><c-w><cr> +noremap <C-g> :tag <c-r><c-w><cr> noremap <C-p> :Files<cr> noremap <leader>e :cn<cr> " go to quickfix next error @@ -123,62 +123,69 @@ endfunction noremap <leader><leader> :call CloseOnLast()<cr> -" vim-lsp settings -let g:lsp_diagnostics_enabled = 0 -let g:lsp_document_code_action_signs_enabled = 0 -let g:lsp_document_highlight_enabled = 0 -"let g:lsp_log_verbose = 1 -"let g:lsp_log_file = expand('~/vim-lsp.log') - -if executable('gopls') - au User lsp_setup call lsp#register_server({ - \ 'name': 'gopls', - \ 'cmd': {server_info->['gopls', '-remote=auto']}, - \ 'allowlist': ['go', 'gomod', 'gohtmltmpl', 'gotexttmpl'], - \ }) - autocmd BufWritePre *.go - \ call execute('LspDocumentFormatSync') | - \ call execute('LspCodeActionSync source.organizeImports') -endif - -if executable('gnopls') - au User lsp_setup call lsp#register_server({ - \ 'name': 'gnopls', - \ 'cmd': {server_info->['gnopls']}, - \ 'allowlist': ['gno'], - \ }) - autocmd BufWritePre *.gno - \ call execute('LspDocumentFormatSync') | - \ call execute('LspCodeActionSync source.organizeImports') -endif - -if executable('clangd') - au User lsp_setup call lsp#register_server({ - \ 'name': 'clangd', - \ 'cmd': {server_info->['clangd', '-background-index']}, - \ 'whitelist': ['c', 'cpp', 'objc', 'objcpp'], - \ }) -endif - -function! s:on_lsp_buffer_enabled() abort - setlocal omnifunc=lsp#complete - if exists('+tagfunc') | setlocal tagfunc=lsp#tagfunc | endif - nmap <buffer> gd <plug>(lsp-definition) - nmap <buffer> gs <plug>(lsp-document-symbol-search) - nmap <buffer> gS <plug>(lsp-workspace-symbol-search) - nmap <buffer> gr <plug>(lsp-references) - nmap <buffer> gi <plug>(lsp-implementation) - nmap <buffer> gy <plug>(lsp-type-definition) - nmap <buffer> <leader>rn <plug>(lsp-rename) - nmap <buffer> [g <plug>(lsp-previous-diagnostic) - nmap <buffer> ]g <plug>(lsp-next-diagnostic) - nmap <buffer> K <plug>(lsp-hover) -endfunction - -augroup lsp_install - au! - autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled() -augroup END +" vim-go settings +let g:go_gopls_enabled = 0 +let g:go_def_mode = 'godef' +let g:go_fmt_command = 'goimports' +let g:go_imports_mode = 'goimports' +let g:go_rename_command = 'gorename' + +" " vim-lsp settings +" let g:lsp_diagnostics_enabled = 0 +" let g:lsp_document_code_action_signs_enabled = 0 +" let g:lsp_document_highlight_enabled = 0 +" "let g:lsp_log_verbose = 1 +" "let g:lsp_log_file = expand('~/vim-lsp.log') +" +" if executable('gopls') +" au User lsp_setup call lsp#register_server({ +" \ 'name': 'gopls', +" \ 'cmd': {server_info->['gopls', '-remote=auto']}, +" \ 'allowlist': ['go', 'gomod', 'gohtmltmpl', 'gotexttmpl'], +" \ }) +" autocmd BufWritePre *.go +" \ call execute('LspDocumentFormatSync') | +" \ call execute('LspCodeActionSync source.organizeImports') +" endif +" +" if executable('gnopls') +" au User lsp_setup call lsp#register_server({ +" \ 'name': 'gnopls', +" \ 'cmd': {server_info->['gnopls']}, +" \ 'allowlist': ['gno'], +" \ }) +" autocmd BufWritePre *.gno +" \ call execute('LspDocumentFormatSync') | +" \ call execute('LspCodeActionSync source.organizeImports') +" endif +" +" if executable('clangd') +" au User lsp_setup call lsp#register_server({ +" \ 'name': 'clangd', +" \ 'cmd': {server_info->['clangd', '-background-index']}, +" \ 'whitelist': ['c', 'cpp', 'objc', 'objcpp'], +" \ }) +" endif +" +" function! s:on_lsp_buffer_enabled() abort +" setlocal omnifunc=lsp#complete +" if exists('+tagfunc') | setlocal tagfunc=lsp#tagfunc | endif +" nmap <buffer> gd <plug>(lsp-definition) +" nmap <buffer> gs <plug>(lsp-document-symbol-search) +" nmap <buffer> gS <plug>(lsp-workspace-symbol-search) +" nmap <buffer> gr <plug>(lsp-references) +" nmap <buffer> gi <plug>(lsp-implementation) +" nmap <buffer> gy <plug>(lsp-type-definition) +" nmap <buffer> <leader>rn <plug>(lsp-rename) +" nmap <buffer> [g <plug>(lsp-previous-diagnostic) +" nmap <buffer> ]g <plug>(lsp-next-diagnostic) +" nmap <buffer> K <plug>(lsp-hover) +" endfunction +" +" augroup lsp_install +" au! +" autocmd User lsp_buffer_enabled call s:on_lsp_buffer_enabled() +" augroup END " Git blame command! Blame normal!:let @a=expand('%')<CR>:let @b=line('.')<CR>:new<CR>:set bt=nofile<CR>:%!git blame -wM --date=short <C-R>a<CR>:<C-R>b<CR> @@ -186,4 +193,5 @@ command! Blame normal!:let @a=expand('%')<CR>:let @b=line('.')<CR>:new<CR>:set b " edit current word as file noremap ge :e <cWORD>
" create a tag entry for current filename -noremap gt :!echo "% % 1" >> tags; sort -o tags -Vu tags
+" noremap gt :!echo "% % 1" >> tags; LC_ALL=C sort -o tags -u tags
+noremap <leader>t :!echo "% % 1" >> tags; LC_ALL=C sort -o tags -u tags
|
