" general config _______________________ set nocompatible filetype plugin indent on set encoding=utf-8 set hidden set ttyfast set updatetime=300 set timeout timeoutlen=1000 ttimeoutlen=5 set undolevels=500 set history=500 set nu set signcolumn=number " make sign replace number set nowrap set backspace=indent,eol,start " indentation set incsearch ignorecase smartcase hlsearch" search set autoindent tabstop=2 softtabstop=2 shiftwidth=2 expandtab " indenting set lazyredraw " only essential redraws set synmaxcol=181 set nobackup nowb noswapfile " no backups set viminfo='20,\"101 "max 100 lines in registers set novisualbell set conceallevel=1 set clipboard=unnamedplus " functions ____________________________ func! ToggleRnu() " toggle: no numbers - relative nummbers if(&nu) | set nonu nornu | else | set nu rnu | endif endfunc " keybindings __________________________ nnoremap let mapleader = " " let maplocalleader = ";" " split nmap ss :spw nmap sv :vsw " split navigate nnoremap sw w nnoremap sh h nnoremap sj j nnoremap sk k nnoremap sl l " split resize nnoremap sH 8< nnoremap sJ 8- nnoremap sK 8+ nnoremap sL 8> " file tree nnoremap sb :Lex " terminal nnoremap t :term " hard mode nnoremap nnoremap nnoremap nnoremap inoremap inoremap inoremap inoremap " quick quit nnoremap w :w nnoremap W :wq nnoremap q :q nnoremap Q :q! " quick exit insert inoremap jj " clear search highlight nnoremap :noh " silver search nnoremap A :Ag " toggle numbers nnoremap n :call ToggleRnu() " edit vim config nnoremap ec :split $MYVIMRC " source current file nnoremap so :so % " plugins ______________________________ call plug#begin() Plug 'preservim/nerdcommenter' Plug 'junegunn/fzf', { 'do': './install --bin' } Plug 'junegunn/fzf.vim' Plug 'vimwiki/vimwiki', {'branch': 'dev'} 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' Plug 'axvr/zepl.vim' Plug 'takac/vim-hardtime' Plug 'neoclide/coc.nvim', {'branch': 'release'} 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', \] Plug 'supercollider/scvim' Plug 'tidalcycles/vim-tidal' call plug#end() " plugin config ________________________ " NERDCommenter let g:NERDSpaceDelims = 1 let g:NERDCompactSexyComs = 1 let NERDAltDelims_haskell = 1 let g:NERDCustomDelimiters = { 'tidal': { 'left': '{-','right': '-}' } } let g:NERDCustomDelimiters = { 'tidal': { 'left': '--','right': '' } } let g:NERDCommentEmptyLines = 1 " fzf popup let g:fzf_layout = {'window': { 'width': 0.62, 'height': 0.62}} " fzf - use silversearcher-ag to respect .gitignore let $FZF_DEFAULT_COMMAND = 'ag --hidden --ignore .git -g ""' let g:ag_working_path_mode="r" set wildignore+=*/node_modules/*,*/tmp/*,*.so,*.swp,*.zip " fzf ignore " vimwiki let g:vimwiki_list = [{'path': '~/.vimwiki/', \ 'template_path': '~/.vimwiki/templates/', \ 'template_default': 'default', \ 'syntax': 'markdown', 'ext': '.md', \ 'path_html': '~/.vimwiki/site_html/', 'custom_wiki2html': 'vimwiki_markdown', \ 'html_filename_parameterization': 1, \ 'template_ext': '.tpl'}] " js & ts 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 = "⇖" " svelte let g:svelte_indent_script = 0 let g:svelte_indent_style = 0 " SuperCollider au BufEnter,BufWinEnter,BufNewFile,BufRead *.sc,*.scd set filetype=supercollider au Filetype supercollider packadd scvim " tidalvim let g:tidal_default_config = {"socket_name": "default", "target_pane": "tidal:1.1"} " hard time let g:hardtime_default_on = 1 let g:hardtime_maxcount = 4 " plugin keybindings ___________________ " coc autocompletion inoremap pumvisible() ? "\" : \ coc#refresh() inoremap pumvisible() ? "\" : "k" inoremap complete_info()["selected"] != "-1" ? "\" : "\u\" " code action on cursor position nmap do (coc-codeaction) set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')} " :Prettier command to prettify file command! -nargs=0 Prettier :CocCommand prettier.formatFile nnoremap :FZF nnoremap p :FZF nnoremap b :Buffers nnoremap h :History let g:fzf_action = { \ 'ctrl-t': 'tab split', \ 'ctrl-s': 'split', \ 'ctrl-v': 'vsplit' \} " theme ________________________________ colorscheme simple-dark set laststatus=2 set noshowcmd set noshowmode set statusline= set statusline+=%3* set statusline+=%= set statusline+=%1*\ %02l/%L\ set statusline+=%2*\%02v set statusline+=%1*\ set statusline+=%0*\ %n\ set shm+=a set shm+=W