if &compatible set nocompatible " Be iMproved endif " Required: set runtimepath+=/home/azak/.cache/dein/repos/github.com/Shougo/dein.vim set runtimepath+=/home/azak/.fzf " Required: if dein#load_state('/home/azak/.cache/dein') call dein#begin('/home/azak/.cache/dein') " Let dein manage dein " Required: call dein#add('/home/azak/.cache/dein/repos/github.com/Shougo/dein.vim') " Add or remove your plugins here: " for snipppes call dein#add('Shougo/neosnippet.vim') call dein#add('Shougo/neosnippet-snippets') " popular snippets call dein#add('honza/vim-snippets') call dein#add('scrooloose/nerdtree') call dein#add('tpope/vim-surround') call dein#add('tpope/vim-repeat') " git plugin call dein#add('tpope/vim-fugitive') call dein#add('gregsexton/gitv') " autocompletion call dein#add('Shougo/deoplete.nvim') " tmux autocompletion call dein#add('wellle/tmux-complete.vim') " Jedi autocompletion "call dein#add('zchee/deoplete-jedi') " my deoplete does not come with jedi instead uses system jedi call dein#add('azak-azkaran/deoplete-jedi') " Clang autocompletion call dein#add('zchee/deoplete-clang') " java deoplete call dein#add('artur-shaik/vim-javacomplete2') " fzf call dein#add('junegunn/fzf.vim') " tagbar using ctags call dein#add('majutsushi/tagbar') " linting with neomake call dein#add('neomake/neomake') " easer navigation in help files call dein#add('dahu/vim-help') " autoformater call dein#add('sbdchd/neoformat') " colorfull indention call dein#add('nathanaelkane/vim-indent-guides') " tmux integration call dein#add('benmills/vimux') " vim airline for design solarized for colors call dein#add('bling/vim-airline') call dein#add('vim-airline/vim-airline-themes') call dein#add('altercation/vim-colors-solarized') " json support call dein#add('elzr/vim-json') " Plugin for indention json call dein#add('bcicen/vim-jfmt') " better start menue call dein#add('mhinz/vim-startify') " support for nerd Font: https://github.com/ryanoasis/nerd-fonts call dein#add('ryanoasis/vim-devicons') " add automatic pairs for ( / and stuff call dein#add('jiangmiao/auto-pairs') " kills buffer without closing window call dein#add( 'qpkorr/vim-bufkill' ) " webapi for gist-vim call dein#add( 'mattn/webapi-vim' ) call dein#add( 'mattn/gist-vim' ) " You can specify revision/branch/tag. "call dein#add('Shougo/deol.nvim', { 'rev': '01203d4c9'}) " Required: call dein#end() call dein#save_state() endif " Required: filetype plugin indent on syntax enable " If you want to install not installed plugins on startup. if dein#check_install() call dein#install() endif " standard configuration set expandtab set tabstop=8 set softtabstop=4 set shiftwidth=4 set autoindent set number set encoding=UTF-8 " starts deoplete on start let g:deoplete#enable_at_startup = 1 let g:deoplete#sources#jedi#show_docstring = 1 " autostart colorfull idention let g:indent_guides_enable_on_vim_startup = 1 " closes scratch window on the top autocmd InsertLeave,CompleteDone * if pumvisible() == 0 | pclose | endif " sets virtualenv let g:python3_host_prog = '/home/azak/env/bin/python' " Neoformat let g:neoformat_enabled_python = ['sqlformat', 'uncrustify', 'autopep8', 'yapf', 'docformatter'] " Enable alignment let g:neoformat_basic_format_align = 1 " Enable tab to spaces conversion let g:neoformat_basic_format_retab = 1 " Enable trimmming of trailing whitespace let g:neoformat_basic_format_trim = 1 " Neomake auto linting " When writing a buffer (no delay). call neomake#configure#automake('w') " auto open Neomake messages let g:neomake_open_list = 0 " omnifuncs set omnifunc=syntaxcomplete#Complete augroup omnifuncs autocmd! autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS autocmd FileType python setlocal omnifunc=pythoncomplete#Complete autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags augroup end set spelllang=en_us " vim airline let g:airline#extensions#tabline#enabled = 1 let g:airline#extensions#tabline#buffer_idx_mode = 1 set laststatus=2 let g:airline_powerline_fonts = 1 let g:airline_theme = 'solarized' " solarized set background=dark colorscheme solarized " treat mra files as yaml files au BufRead,BufNewFile *.mra set filetype=yaml " add md files as markdown for Highlighting " treat markdown files the same au! BufRead,BufNewFile *.markdown set filetype=markdown au! BufRead,BufNewFile *.md set filetype=markdown "au BufNewFile,BufReadPost *.md set filetype=markdown let g:markdown_fenced_languages = ['html', 'python', 'bash=sh', 'sql', 'yaml'] " start limelight on Goyo mode autocmd! User GoyoEnter Limelight autocmd! User GoyoLeave Limelight! let g:limelight_conceal_ctermfg = 241 " auto fold xml and change folding to syntax for xml files let g:xml_syntax_folding=1 au FileType xml setlocal foldmethod=syntax " to auto load and auto save folds au BufWinLeave *.* mkview " share clipboard set clipboard=unnamedplus " make vim transparent hi Normal guibg=NONE ctermbg=NONE " Use the https://github.com/BurntSushi/ripgrep if possible (much faster than Ack) if executable('rg') let g:ackprg = 'rg --vimgrep --smart-case' endif " dont autosave json indented let g:jfmt_on_save = 1 let g:jfmt_autofmt = 1 " " KEY BINDINGS " let mapleader = "," imap " deoplete tab-complete inoremap pumvisible() ? "\" : "\" inoremap pumvisible() ? "\" : "\" inoremap complete() " opens Tag nnoremap b :TagbarToggle " GIT keys nnoremap gs :Gstatus nnoremap gd :Gdiff nnoremap gc :Gcommit nnoremap gb :Gblame nnoremap gl :Glog nnoremap gp :Git push nnoremap gw :Gwrite nnoremap gr :Gremove autocmd BufReadPost fugitive://* set bufhidden=delete nnoremap gv :Gitv nnoremap gV :Gitv! " Toggle spell checking on and off with `,s` map s :set spell! map g gq} map d ]S map a [S map w z= map x :%!xmllint --format % " Normale Mode fast save nmap , :w! " next Buffer map l :bn " previous Buffer map h :bp " Buf kill map e :BD "fast switch between splits map j map k map h map l noremap j noremap k noremap h noremap l " change airline tabs nmap 1 AirlineSelectTab1 nmap 2 AirlineSelectTab2 nmap 3 AirlineSelectTab3 nmap 4 AirlineSelectTab4 nmap 5 AirlineSelectTab5 nmap 6 AirlineSelectTab6 nmap 7 AirlineSelectTab7 nmap 8 AirlineSelectTab8 nmap 9 AirlineSelectTab9 " open nerdtree map tt :NERDTreeToggle map tb :NERDTreeFromBookmark map tf :NERDTreeFind " deletes empty lines command DeleteEmptyLine :g/^$/d "vnoremap gv :call VisualSelection('gv', '') " search for marked string in visual mode vnoremap f "hy/h/ " search and repleace in visual mode " By pressing ctrl+r in visual mode, you will be prompted to enter text to replace with. " Press enter and then confirm each change you agree with y or decline with n. vnoremap r "hy:%s/h//gc "vnoremap r :call VisualSelection('replace') " search in visual mode " By pressing ctrl+d in visual mode, you will be prompted to enter text to " replace with. Press enter and then confirm each change you agree with y or decline with n. vnoremap "hy:g/.*h.*/d " --column: Show column number " --line-number: Show line number " --no-heading: Do not show file headings in results " --fixed-strings: Search term as a literal string " --ignore-case: Case insensitive search " --no-ignore: Do not respect .gitignore, etc... " --hidden: Search hidden files and folders " --follow: Follow symlinks " --glob: Additional conditions for search (in this case ignore everything in the .git/ folder) " --color: Search color options command! -bang -nargs=* Find call fzf#vim#grep('rg --column --line-number --no-heading --fixed-strings --ignore-case --no-ignore --hidden --follow --glob "!.git/*" --color "always" '.shellescape(), 1, 0) "command! -bang -nargs=* Find call fzf#vim#grep('rg --column --line-number --no-heading --fixed-strings --ignore-case --no-ignore --hidden --follow --glob "!.git/*" --color "always" '.shellescape().'| tr -d "\017"', 1, 0) " map find to rg map rg :Find " Run the current file with rspec "map :call VimuxRunCommand("clear; rspec " . bufname("%")) map :call VimuxPromptCommand map :call VimuxRunCommand("" . bufname("%")) "augroup compiler " autocmd! " autocmd FileType python map :call VimuxRunCommand("python " . bufname("%")) " autocmd FileType ruby map :call VimuxRunCommand("ruby " . bufname("%")) " autocmd F "augroup end " Run command without sending a return "map rq :call VimuxRunCommand("clear; rspec " . bufname("%"), 0) " Run last command executed by VimuxRunCommand map :VimuxRunLastCommand " Close vim tmux runner opened by VimuxRunCommand "map :VimuxCloseRunner " Interrupt any command running in the runner pane map :VimuxInterruptRunner " starts GOYO map :Goyo " Plugin key-mappings. for neosnippet " Note: It must be "imap" and "smap". It uses mappings. imap (neosnippet_expand_or_jump) smap (neosnippet_expand_or_jump) xmap (neosnippet_expand_target) " SuperTab like snippets behavior. " Note: It must be "imap" and "smap". It uses mappings. imap \ pumvisible() ? "\" : \ neosnippet#expandable_or_jumpable() ? \ "\(neosnippet_expand_or_jump)" : "\" smap neosnippet#expandable_or_jumpable() ? \ "\(neosnippet_expand_or_jump)" : "\"