set nocompatible " be iMproved, required filetype off " required " set the runtime path to include Vundle and initialize set rtp+=~/.config/nvim/bundle/Vundle.vim call vundle#begin() " let Vundle manage Vundle, required Plugin 'VundleVim/Vundle.vim' Plugin 'Valloric/YouCompleteMe' Plugin 'sirver/ultisnips' Plugin 'honza/vim-snippets' Plugin 'fatih/vim-go' Plugin 'majutsushi/tagbar' Plugin 'mileszs/ack.vim' Plugin 'zaquestion/vim-monokai' Plugin 'tmhedberg/SimpylFold' Plugin 'tpope/vim-fugitive' Plugin 'shumphrey/fugitive-gitlab.vim' Plugin 'scrooloose/syntastic' Plugin 'Chiel92/vim-autoformat' Plugin 'godlygeek/tabular' " PHP " $ sudo apt install phpmd php-codesniffer " ctags.io Plugin 'shawncplus/phpcomplete.vim' Plugin 'StanAngeloff/php.vim' Plugin 'joonty/vdebug' " Graphviz Dot Plugin 'wannesm/wmgraphviz.vim' call vundle#end() set timeoutlen=1000 ttimeoutlen=10 " Some Linux distributions set filetype in /etc/vimrc. " Clear filetype flags before changing runtimepath to force Vim to reload them. if exists("g:did_load_filetypes") filetype off filetype plugin indent off endif set rtp+=/usr/local/go/misc/vim " replace $GOROOT with the output of: go env GOROOT filetype plugin indent on syntax on if executable('ag') let g:ackprg = 'ag -Q --ignore-dir vendor --ignore-dir Vendors --ignore-dir app/ext/vendors' endif let g:ackhighlight = 1 " use Ag instead of Ack when typing cnoreabbrev ag Ack cnoreabbrev Ag Ack "noremap :exec 'Ack!' expand('') getcwd() noremap :exec 'Ack!' '"'.matchstr(getline("."), expand('').'(\?').'"' getcwd() "remove trailing whitespace on save autocmd BufWritePre * :%s/\s\+$//e autocmd BufNewFile,BufRead *.diag set filetype=diag autocmd BufNewFile,BufRead *.gv set filetype=dot colorscheme monokai set lazyredraw " split preferences set splitbelow set splitright set relativenumber set number " Remove awful omnicomplete scratch preview set completeopt-=preview " Shows matching ({[]}) set showmatch " Allows case insensitive searching with smart exceptions set ignorecase set smartcase " Path completion set wildmode=longest,list set wildmenu " Do highlighting on search and macro do clear search set hlsearch nnoremap :noh " indentation set shiftwidth=4 set expandtab set pastetoggle= " Keybinding hotkeys for switching windows map h map j map k map l map + + map - - " Leader config let mapleader="," " starts a :e command in the same directory as the current buffer nnoremap e :e =expand("%:p:h") . "/" nnoremap E :Explore " re-executes the last command nnoremap @: nnoremap ft :exec 'sp ~/.config/nvim/ftplugin/' . &filetype . '.vim' set tags=$projects/tags nmap :TagbarToggle " Trigger configuration. Do not use if you use https://github.com/Valloric/YouCompleteMe. let g:UltiSnipsExpandTrigger="" let g:UltiSnipsJumpForwardTrigger="" let g:UltiSnipsJumpBackwardTrigger="" let g:netrw_liststyle=3 let g:netrw_bufsettings = 'noma nomod nu nobl nowrap ro' tnoremap let g:terminal_scrollback_buffer_size = 2147483647 let g:formatters_python = ['yapf'] let g:formatdef_yapf = "'yapf --style=\"{based_on_style: pep8, indent_width: 4, join_multiple_lines: true, SPACE_BETWEEN_ENDING_COMMA_AND_CLOSING_BRACKET: false, COALESCE_BRACKETS: true, DEDENT_CLOSING_BRACKETS: true, COLUMN_LIMIT: 120}\" -l '.a:firstline.'-'.a:lastline" let @s = '^/self\. dwdwicfg["lguwwi"]' let g:fugitive_gitlab_domains = ['https://gitlab.corp.tune.com'] " define a fancy nvim clipboard provider let g:clipboard = { \ 'name': 'Vim Clipboard', \ 'copy': { \ '+': 'xclip -i -selection clipboard', \ '*': 'xclip -i -selection secondary', \ }, \ 'paste': { \ '+': 'xclip -o -selection clipboard', \ '*': 'xclip -o -selection secondary', \ }, \ 'cache_enabled': 1, \ } " tell nvim to use * as its internal clipboard " now vim sessions can share yank buffers by using the virtually unheard of " secondary selection buffer! set clipboard=unnamed