""""""""""""""""""""""""""""""""""""" " Miguel's .vimrc " " Author: m.i@gmx.at " " Last Update: 2019-05-25 " """"""""""""""""""""""""""""""""""""" " {{{ NOTES " THIS LOOSE NOTES REQUIRE REVIEW! " external links to browser " https://wiki.haskell.org/99_questions/Solutions/34 " http://www.stephendiehl.com/posts/vim_2016.html " https://github.com/lukerandall/haskellmode-vim " :h compiler-plugin " :help equalprg " 15:15:33 gagbo | and then you can map it on key like nnoremap │ aauren " | :compiler clang-tidy:make and nnoremap │ abbec " | :compiler clang:make in like │ Accord " | ~/.vim/after/ftplugin/cpp.vim for example " https://lexi-lambda.github.io/blog/2018/02/10/an-opinionated-guide-to-haskell-in-2018/ " https://mendo.zone/fun/neovim-setup-haskell/ " https://github.com/aloiscochard/codex " https://github.com/haskell/haskell-ide-engine#using-hie-with-vim-or-neovim ? " ghc-mod, hlint (haskell) " https://wiki.haskell.org/Vim " http://www.alexeyshmalko.com/2014/using-vim-as-c-cpp-ide/ " https://github.com/vim-airline/vim-airline " https://github.com/spf13/spf13-vim " http://antjanus.com/blog/thoughts-and-opinions/use-vim/ " http://stevelosh.com/blog/2010/09/coming-home-to-vim/ " http://derekingrouville.com/2012/vim-is-my-ide/ " https://github.com/VundleVim/Vundle.vim " draculatheme.com " learnvimscriptthehardway.stevelosh.com " " autocomplete " jump to defintion / list calls / ctags shortcuts? " spellcheck / translate / thesaurus / dict " change mappings to more specific mappings and use noremap! " toggle 'cursorline' via hotkey for nicer reading experience. " ft=c.doxygen etc. " include dependancies as git submodules (wherever possible?? seriously?) (licenses?) " :help complete-functions " quickfix " compiler/debugger invocation " release vim-colortune plugin " load layout automatically on start (pff) " ConqueGDB Resize " Do something about startup lag (because of YouCompleteMe) " Do something about the input problems in ConqueGDB/Term (YouCompl?) " implement a plugin for fast-reading (check if one exists first ;)) " plugins on vim.org etc. " syntastic! https://github.com/vim-syntastic/syntastic " vimproc! https://github.com/Shougo/vimproc.vim " pathogen / vundle DONE " NerdTree DONE " minibufexpl DONE " fugitive DONE " vim-sensible DONE " taglist.vim " snipMate " c.vim " autocomplpop " surround " perl-support " matchit " vimspell " conqueshell " fuzzyfinder " Nerd Commenter " tSkeleton " grep " cppcomplete " colortest " colour sampler pack " gundo " CScope / CCTree " inline reference/ (stlrefvim?) " emmet.io (webdev) " }}} " {{{ VUNDLE " as required by https://github.com/VundleVim/Vundle.vim set nocompatible filetype off set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() Plugin 'gmarik/Vundle.vim' " Plugin 'Valloric/YouCompleteMe' Plugin 'scrooloose/nerdtree' Plugin 'altercation/vim-colors-solarized' Plugin 'fholgado/minibufexpl.vim' Plugin 'majutsushi/tagbar' Plugin 'tpope/vim-fugitive' Plugin 'tpope/vim-sensible' " Plugin 'Shougo/vimproc.vim' Plugin 'MarcWeber/vim-addon-mw-utils' Plugin 'tomtom/tlib_vim' Plugin 'garbas/vim-snipmate' Plugin 'honza/vim-snippets' " Plugin 'vim-scripts/Conque-GDB' " Plugin 'dracula/vim' " Plugin 'git://ex40.softwarefools.com/vim-potion.git' " Plugin 'git://ex40.softwarefools.com/vim-colortune.git' call vundle#end() filetype plugin indent on " }}} "{{{ DISABLED " limited .vimrc in current dir " set exrc " set secure " let g:ConqueGdb_Leader = '\' " let g:ConqueTerm_CloseOnEnd = 1 " let g:potion_command = "/home/miguel/int/dev/potion/bin/potion" " set wrap " set showbreak=>_ " move line under the cursor up and down. " nnoremap - ddp " nnoremap _ kddpk " abbreviations and typo correction " iabbrev teh the " }}} " {{{ BASICS " {{{ spelling OFF " set spell " }}} " {{{ mapleaders " use but remap to _ so it is visible for 'showcmd' nmap _ let mapleader="\_" let maplocalleader="\_" " }}} " {{{ misc set nocompatible set foldmethod=marker set nowrap set backspace=2 " set ruler set showcmd set number set hidden "set cursorcolumn set cursorline " save before making etc. set autowrite " some nice candy set laststatus=2 "always show status line on last window set wildmenu " indent " set autoindent " set cindent " mouse support in xterm set mouse=a "other set previewheight=25 " http://robots.thoughtbot.com/vim-splits-move-faster-and-more-naturally " set splitbelow " set splitright " easy move between windows nnoremap nnoremap nnoremap nnoremap " }}} " {{{ statusline set statusline=%f " Path to the file set statusline+=%= " Switch to the right side set statusline+=%l,%c " Current line,column set statusline+=\ (%L,%P) " Percentage "set statusline& " reset " }}} " {{{ terminal width / colocolumn " http://richarddingwall.name/2008/05/31/is-the-80-character-line-limit-still-relevant/ " " set tw=80 " set tw=72 " set tw=78 (for instance vims :help) set tw=0 set colorcolumn=73 " }}} " {{{ tabs set listchars=tab:>. set tabstop=8 set expandtab set softtabstop=4 set shiftwidth=4 set shiftround " }}} " {{{ folding set foldcolumn=5 set foldlevelstart=0 " }}} " {{{ colorscheme / syntax highlight syntax enable if has('gui_running') set background=light else set background=dark endif set background=dark colorscheme solarized hi SpellBad ctermfg=white hi SpellBad ctermbg=red syntax sync fromstart " }}} " {{{ minimal gui " set guioptions= set guioptions-=m set guioptions-=T set guioptions-=r set guioptions-=L set guifont=Monospace\ 9 " }}} " {{{ search set hlsearch set incsearch " }}} " {{{ match brackets set showmatch set matchtime=5 " }}} " }}} " {{{ KEY BINDINGS " temporary mappings, to get rid of bad habits. " inoremap " inoremap " inoremap " inoremap " inoremap "map :silent make \| copen \| redraw! "map :silent make \| redraw! "map :make "nnoremap :tselect "nnoremap cc :call Colortune_fill() " activate 'very magic' for searches automatically nnoremap / /\v nnoremap ? ?\v " alt esc in insert mode inoremap jk " retab " map rt :retab! " toggle tabs visibility noremap t :set invlist " easy editing and sourcing of vimrc " nnoremap sv :source $MYVIMRC nnoremap ev :e $MYVIMRC " turn off search highlight nnoremap h :nohlsearch " toggle visibility of trailing whitespaces nnoremap w :match ErrorMsg /\v +$/ nnoremap W :match " toggle and navigate quickfix window nnoremap cn :cnext nnoremap cp :cprevious nnoremap cc :cc " buffer navigaion nnoremap bn :MBEbn nnoremap bp :MBEbp nnoremap bd :MBEbd " make " nnoremap mm :silent make! " nnoremap mc :silent make! clean " nnoremap mn :silent make! new " nnoremap mr :silent make!:call system("make run &") " nnoremap md :silent make!:call system("make debug &") " nnoremap ms :silent make! stop " nnoremap mf :silent make! %:r:redraw! " nnoremap mx :silent make! %:r !./%:r " session handling " nnoremap ss :call Session_save() " nnoremap sl :call Session_load() " layout nnoremap ln :NERDTreeToggle nnoremap lt :TagbarToggle "nnoremap lg :ConqueGdb nnoremap lm :MBEToggle nnoremap lq :copen " }}} " {{{ FILETYPES " {{{ custom highlight augroup filetype_custom_highlight autocmd! au BufRead,BufNewFile *.twig set filetype=htmljinja augroup END " }}} " {{{ markdown augroup filetype_markdown autocmd! autocmd FileType markdown setlocal spell " autocmd FileType markdown setlocal spell " autocmd FileType markdown setlocal list augroup END " }}} " {{{ cpp augroup filetype_cpp autocmd! autocmd FileType cpp nnoremap c I// autocmd FileType cpp :iabbrev iff if () {}jkF autocmd FileType cpp nnoremap bo :r ~/_int/dev/misc/c++/template/template.cpp augroup END " }}} " {{{ haskell augroup filetype_haskell autocmd! " autocmd FileType haskell setlocal foldmethod=marker " autocmd Filetype haskell map :w:term cabal -- exec runghc % " autocmd Filetype haskell map :w:term make " autocmd Filetype haskell map :w:term make " autocmd FileType haskell setlocal expandtab augroup END " }}} " }}}