"" Basic Settings {{{{ "" syntax enable set autoindent set autoread set autowrite set backspace=indent,eol,start set backupdir=~/tmp,/var/tmp,/tmp/ set cmdheight=1 set completeopt=menu,preview set cursorline set diffopt=vertical set directory=~/tmp,/var/tmp,/tmp/ set encoding=utf-8 set expandtab set foldmethod=marker set gdefault set hidden set hlsearch set ignorecase set incsearch set lazyredraw set list set listchars=extends:>,nbsp:_,precedes:<,tab:\ \ ,trail:ยท set modelines=0 set nobackup set nocompatible set noerrorbells set noexrc set nojoinspaces set nostartofline set noswapfile set nowrap set nowritebackup set number set numberwidth=5 set ruler set scrolloff=3 set secure set shell=bash set shiftround set shiftwidth=2 set showcmd set showmatch set showmode set showtabline=2 set smartcase set softtabstop=2 set splitbelow set splitright set t_Co=256 set t_vb= set tabstop=2 set tags=./tags;,tags; set title set ttyfast set updatetime=200 set visualbell set wildmenu set wildmode=longest,list:longest set wildignore+=*.o,*.out,*.obj,.git,*.rbc,*.rbo,*.class,.svn,*.gem set wildignore+=*.zip,*.tar.gz,*.tar.bz2,*.rar,*.tar.xz,*.zst set wildignore+=*/vendor/gems/*,*/vendor/cache/*,*/.bundle/*,*/.sass-cache/* set wildignore+=*.swp,*~,._* set wildignore+=*/tmp/*,*.so,*/coverage/* set wildignore+=*/vendor/* if has('nvim') color sorbet set clipboard+=unnamedplus else color happy_hacking set termencoding=utf-8 if system('uname -s') == "Darwin\n" "set clipboard^=unnamed,unnamedplus set clipboard=unnamed else set clipboard=unnamedplus endif endif if executable('ag') set grepprg=ag\ --vimgrep\ $* endif if has('signcolumn') set signcolumn=number endif if has("statusline") && !&cp set laststatus=2 set statusline=%f set statusline+=\ -\ set statusline+=%y set statusline+=%= set statusline+=[buffer:%02n] set statusline+=[column:%02v] set statusline+=[line:%04l set statusline+=/ set statusline+=%04L] set statusline+=%#warningmsg# set statusline+=%* endif if has("termguicolors") let &t_8f = "\[38:2:%lu:%lu:%lum" let &t_8b = "\[48:2:%lu:%lu:%lum" set termguicolors endif runtime macros/matchit.vim filetype plugin indent on set omnifunc=syntaxcomplete#Complete " }}}} "" Mappings {{{{ "" let mapleader = "," let localleader = "\\" inoremap jk " nnoremap / /\v nnoremap ; : nnoremap :Buffers nnoremap h nnoremap j_ nnoremap k_ nnoremap l nnoremap :GFiles nnoremap :Files nnoremap " viwa"hbi"lel nnoremap ' viwa'hbi'lel nnoremap :noh nnoremap L mQgewvu`Q nnoremap U mQgewvU`Q nnoremap W :%s/\s\+$//:let @/='' nnoremap ev :vsplit $MYVIMRC nnoremap fef :normal! gg=G`` nnoremap gb :Git blame -w -M nnoremap h sl nnoremap hs :set hlsearch! hlsearch? nnoremap l mQviwu`Q nnoremap n :NERDTreeFind nnoremap p "+p nnoremap sv :source $MYVIMRC nnoremap u mQviwU`Q nnoremap v vl nnoremap F :Ag nnoremap f :grep! "\b\b":cw nnoremap n :NERDTreeClose nnoremap cd :lcd %:h nnoremap fc /\v^[<=>]{7}( .*\|$) nnoremap md :!mkdir -p %:p:h nnoremap tw :set invwrap:set wrap? nnoremap ul :t.Vr= nnoremap gw :s/\(\%#\w\+\)\(\_W\+\)\(\w\+\)/\3\2\1/`' nnoremap za nnoremap % nnoremap H ^ nnoremap L $ noremap gj noremap gk noremap = = vnoremap / /\v vnoremap / c vnoremap f y:Ag! " vnoremap zf vnoremap % nmap / CommentaryLine xmap / Commentary "imap (fzf-maps-i) nmap (fzf-maps-n) omap (fzf-maps-o) xmap (fzf-maps-x) "inoremap fzf#vim#complete("cat tags") imap (fzf-complete-path) imap (fzf-complete-file-ag) imap (fzf-complete-word) imap (fzf-complete-line) imap (fzf-complete-buffer-line) " }}}} "" Abbreviations {{{{ "" iabbrev adn and iabbrev ohter other iabbrev waht what iabbrev teh the iabbrev tehn then iabbrev @@ mo@mokhan.ca " }}}} "" Plugin Configuration {{{{ "" let g:fzf_tags_command = 'ctags -R' let g:go_fmt_autosave = 1 let g:go_list_type = "quickfix" let g:go_play_browser_command = 'browser %URL%' let g:markdown_fenced_languages = [ \ 'bash=sh', \ 'go', \ 'golang=go', \ 'html', \ 'javascript', \ 'js=javascript', \ 'json=javascript', \ 'mermaid', \ 'ruby', \ 'rust', \ 'sh', \ 'sql' \ ] let g:markdown_folding = 0 let g:markdown_recommended_style = 0 let g:ruby_indent_assignment_style = 'variable' let g:ruby_indent_block_style = 'do' let g:ruby_not_expensive = 1 let g:ruby_operators = 1 let g:ruby_space_errors = 1 " }}}}