├── init.vim ├── .gitignore ├── README.md ├── plugin ├── todays_date.vim ├── insert_tab_wrapper.vim ├── promote_to_let.vim ├── rename_file.vim ├── open_changed_files.vim ├── map.vim ├── switch_test_and_prod.vim └── coc.vim ├── gvimrc ├── lua └── init.lua ├── coc-settings.json ├── colors ├── grb256.vim ├── green.vim ├── tir_black.vim ├── smyck.vim ├── allhallowseve.vim ├── jummidark.vim ├── ariake.vim └── codedark.vim ├── vimrc ├── .tmux.conf └── ctags /init.vim: -------------------------------------------------------------------------------- 1 | vimrc -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | autoload/* 2 | plugged/* 3 | sessions/ 4 | .netrwhist 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # dotvim 2 | 3 | This is my vim configuration. 4 | 5 | 6 | ## ctags 7 | 8 | link the ~/.ctags to ~/dotvim/ctags (it adds support for clojure ctags) 9 | -------------------------------------------------------------------------------- /plugin/todays_date.vim: -------------------------------------------------------------------------------- 1 | " custom command to enter the todays date into the buffer 2 | function! Today() 3 | :pu='[[' . strftime('%Y-%m-%d') . ']]' 4 | endfunction 5 | command! Today :call Today() 6 | -------------------------------------------------------------------------------- /plugin/insert_tab_wrapper.vim: -------------------------------------------------------------------------------- 1 | function! InsertTabWrapper() 2 | let col = col('.') - 1 3 | if !col || getline('.')[col - 1] !~ '\k' 4 | return "\" 5 | else 6 | return "\" 7 | endif 8 | endfunction 9 | "inoremap InsertTabWrapper() 10 | "inoremap 11 | -------------------------------------------------------------------------------- /plugin/promote_to_let.vim: -------------------------------------------------------------------------------- 1 | """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 2 | " PROMOTE VARIABLE TO RSPEC LET 3 | """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 4 | function! PromoteToLet() 5 | :normal! dd 6 | " :exec '?^\s*it\>' 7 | :normal! P 8 | :.s/\(\w\+\) = \(.*\)$/let(:\1) { \2 }/ 9 | :normal == 10 | endfunction 11 | :command! PromoteToLet :call PromoteToLet() 12 | -------------------------------------------------------------------------------- /gvimrc: -------------------------------------------------------------------------------- 1 | set guioptions-=r 2 | set guioptions-=R 3 | set guioptions-=l 4 | set guioptions-=L 5 | "set guifont=SF\ Mono:h15 6 | set guifont=Monaco:h13 7 | colo tir_black 8 | let g:terminal_ansi_colors = [ 9 | \ '#616e64', '#0d0a79', 10 | \ '#6d610d', '#0a7373', 11 | \ '#690d0a', '#6d696e', 12 | \ '#0d0a6f', '#616e0d', 13 | \ '#0a6479', '#6d0d0a', 14 | \ '#617373', '#0d0a69', 15 | \ '#6d690d', '#0a6e6f', 16 | \ '#610d0a', '#6e6479', 17 | \] 18 | 19 | -------------------------------------------------------------------------------- /lua/init.lua: -------------------------------------------------------------------------------- 1 | require("mason").setup() 2 | --require("mason-lspconfig").setup() 3 | require("mason-lspconfig").setup_handlers { 4 | -- The first entry (without a key) will be the default handler 5 | -- and will be called for each installed server that doesn't have 6 | -- a dedicated handler. 7 | function (server_name) -- default handler (optional) 8 | require("lspconfig")[server_name].setup {} 9 | end, 10 | -- Next, you can provide a dedicated handler for specific servers. 11 | -- For example, a handler override for the `rust_analyzer`: 12 | } 13 | -------------------------------------------------------------------------------- /plugin/rename_file.vim: -------------------------------------------------------------------------------- 1 | """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 2 | " RENAME CURRENT FILE 3 | """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 4 | function! RenameFile() 5 | let old_name = expand('%') 6 | let new_name = input('New file name: ', expand('%'), 'file') 7 | if new_name != '' && new_name != old_name 8 | exec ':saveas ' . new_name 9 | exec ':silent !rm ' . old_name 10 | redraw! 11 | endif 12 | endfunction 13 | "map n :call RenameFile() 14 | 15 | 16 | -------------------------------------------------------------------------------- /plugin/open_changed_files.vim: -------------------------------------------------------------------------------- 1 | """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 2 | " OpenChangedFiles COMMAND 3 | " Open a split for each dirty file in git 4 | """""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 5 | function! OpenChangedFiles() 6 | only " Close all windows, unless they're modified 7 | let status = system('git status -s | grep "^ \?\(M\|A\|UU\)" | sed "s/^.\{3\}//"') 8 | let filenames = split(status, "\n") 9 | exec "edit " . filenames[0] 10 | for filename in filenames[1:] 11 | exec "sp " . filename 12 | endfor 13 | endfunction 14 | command! OpenChangedFiles :call OpenChangedFiles() 15 | 16 | -------------------------------------------------------------------------------- /plugin/map.vim: -------------------------------------------------------------------------------- 1 | " Mappings 2 | "" use `;` as `:` 3 | nnoremap \ ; 4 | nnoremap ; : 5 | map j gj 6 | map k gk 7 | tnoremap 8 | "" Kill current buffer 9 | map ,D :bp\|bd# 10 | "" expand current path 11 | map ,e :e =expand("%:p:h") . "/" 12 | "" expand current path in split 13 | map ,s :split =expand("%:p:h") . "/" 14 | "" find word under cursor 15 | let maplocalleader = "\\" 16 | let mapleader = "," 17 | "Insert => 18 | "imap => 19 | " Enter to Run tests 20 | map :wa!\|:TestFile 21 | " Test Runners 22 | map ,tf :wa!\|:TestFile 23 | map ,tt :wa!\|:TestNearest 24 | map ,ts :wa!\|:TestSuite 25 | " Rspec specific 26 | map p :PromoteToLet 27 | " Fix spelling 28 | nmap a (coc-codeaction-selected) 29 | " File Explorer 30 | map ,X :CocCommand explorer 31 | 32 | " Map jj to save 33 | imap jj :w! 34 | 35 | " Codium 36 | imap