" General config ______________________ " " Most acronyms are unreadable, but they keep the overview " I have to do a quick :h lookup for most of these anyway. se nocp " Disable vi incompatibility filet plugin indent on " Filetype recognition se enc=utf8 " se hid " Allow hiding unsaved buffers se tf " Fast tty se ut=300 " 300ms for update time se to tm=200 ttm=5 " Timeouts se shm+=c " ... se ul=500 hi=500 " History and undo se nu rnu scl=number " Line numbers & signs se nowrap se bs=indent,eol,start " Indentation se ai ts=2 sts=2 sw=2 et " Indentation se is ic scs hls " Search se lz " Only essential redraws se nobk nowb noswf " No backups se vi='20,\"101 " Max 100 lines in registers se novb " Bell se cole=0 cocu="" " Conceal se cb=unnamedplus " Clipboard se fcs+=vert:│ " Cleaner split separator (tmux style) set lcs=tab:→\ ,trail:· " Whitespace rendering set ar " Autoread " Functions ____________________________ " Toggle line numbers fu! ToggleRnu() " toggle: no numbers - relative nummbers if(&nu) | se nonu nornu | else | se nu rnu | endif endfu " Keybindings """"""""""""" " Leader keys nn let mapleader = " " let maplocalleader = ";" " Splits & navigation nm ss :spw| " Split horizontal nm sv :vsw| " Split vertical nn sw w| " Navigate splits nn sh h| " " nn sj j| " " nn sk k| " " nn sl l| " " nn sH 8<| " Resize splits nn sJ 8-| " " nn sK 8+| " " nn sL 8>| " " nn s= =| " Equalize splits " Open nn sb :Lex| " File tree nn t :term| " Open terminal " Remaps ino jj | " Normal now nn | " Hard mode nn | " " nn | " " nn | " " ino | " " ino | " " ino | " " ino | " " " Search nn / :noh nn f :Ag " Line numbers nn n :call ToggleRnu() " Vim configuration nn ec :split $MYVIMRC nn so :so % " Plugins """"""""" call plug#begin() " Coc Plug 'neoclide/coc.nvim', {'branch': 'release'} " General Plug 'tpope/vim-commentary' Plug 'machakann/vim-sandwich' Plug 'junegunn/fzf', { 'do': './install --bin' } Plug 'junegunn/fzf.vim' Plug 'vimwiki/vimwiki' " JS and TypeScript Plug 'pangloss/vim-javascript', { 'for': ['javascript', 'javascript.jsx'] } Plug 'leafgarland/typescript-vim', { 'for': ['typescript', 'typescript.tsx'] } Plug 'peitalin/vim-jsx-typescript', { 'for': ['typescript.tsx'] } Plug 'evanleck/vim-svelte', {'branch': 'main'} " LaTeX Plug 'lervag/vimtex' " TidalCycles Plug 'supercollider/scvim' Plug 'tidalcycles/vim-tidal' " Lisp & Scheme Plug 'kovisoft/slimv', { 'for': ['clojure', 'scheme', 'racket'] } call plug#end() " Plugin config """"""""""""""" " Coc let g:coc_global_extensions = [ \'coc-eslint', \'coc-prettier', \'coc-tsserver', \'coc-python', \'coc-html', \'coc-emmet', \'coc-css', \'coc-svg', \'coc-svelte', \'coc-json', \'coc-markdownlint', \'coc-yaml', \'coc-snippets' \] " Autocomplete ino pumvisible() ? "\" : \ coc#refresh() ino pumvisible() ? "\" : "k" ino complete_info()["selected"] != "-1" ? "\" : "\u\" " Code action on cursor position nm do (coc-codeaction) " Coc statusline se statusline^=%{coc#status()}%{get(b:,'coc_current_function','')} " Prettier command com! -nargs=0 Prettier :CocCommand prettier.formatFile " LaTex let g:vimtex_view_method='zathura' let g:tex_flavor = 'latex' let g:tex_conceal='abdmg' let g:vimtex_quickfix_mode=0 " Comments xm c Commentary nm c Commentary nm cc CommentaryLine " FZF let g:fzf_layout = {'window': { 'width': 0.62, 'height': 0.62}} let g:ag_working_path_mode="r" let $FZF_DEFAULT_COMMAND = 'ag --hidden --ignore .git -g ""' " respect gitignore se wildignore+=*/node_modules/*,*/tmp/*,*.so,*.swp,*.zip " " ignore these " Wiki let g:vimwiki_auto_chdir = 1 let g:vimwiki_list = [{'path': '~/.vimwiki/', 'syntax': 'markdown', 'ext': '.md'}] " JS and TypeScript let g:javascript_plugin_jsdoc = 1 " jsdoc syntax highlighting let g:javascript_plugin_flow = 1 " flow syntax highlighting let g:javascript_conceal_function = "ƒ" let g:javascript_conceal_return = "⇖" let g:svelte_indent_script = 0 let g:svelte_indent_style = 0 " SuperCollider au BufEnter,BufWinEnter,BufNewFile,BufRead *.sc,*.scd se filetype=supercollider au Filetype supercollider packadd scvim " Tidalcycles (sclang and vim-tidal) let g:tidal_default_config = {"socket_name": "default", "target_pane": "tidal:1.1"} " Slimv let g:slimv_swank_cmd = '! tmux new-window -d -n REPL-SBCL "sbcl --load ~/.vim/bundle/slimv/slime/start-swank.lisp"' " Plugin keybindings """""""""""""""""""" " FZF nn :FZF nn p :FZF nn b :Buffers nn h :History let g:fzf_action = { \ 'ctrl-t': 'tab split', \ 'ctrl-s': 'split', \ 'ctrl-v': 'vsplit' \} " Color theme & statusline """""""""""""""""""""""""" se nosc se nosmd se ls=2 se stl=\ %0*%n se stl+=\ %m se stl+=\ %y%1* se stl+=\ %<%F se stl+=\ %1*%=%5l%* se stl+=%2*/%L%* colo simple-dark " Other """"""""""""""""""""""" " VIM config hot reload autocmd! bufwritepost .vimrc source %