" _ " __ _(_)_ __ ___ _ __ ___ " \ \ / / | '_ ` _ \| '__/ __| " \ V /| | | | | | | | | (__ " \_/ |_|_| |_| |_|_| \___| " let mapleader = "," call plug#begin('~/.vim/plugged') "Update with PlugInstall Plug 'PotatoesMaster/i3-vim-syntax' Plug 'junegunn/goyo.vim' Plug 'junegunn/fzf.vim' Plug 'junegunn/limelight.vim' Plug 'tpope/vim-surround' Plug 'tpope/vim-repeat' Plug 'vimwiki/vimwiki' Plug 'vim-airline/vim-airline' Plug 'Shougo/deoplete.nvim' Plug 'dense-analysis/ale' "Plug 'vim-syntastic/syntastic' "Plug 'Valloric/YouCompleteMe' "Plug 'OmniSharp/omnisharp-vim' Plug 'dylanaraps/wal.vim' call plug#end() " Basic settings set nocompatible set encoding=utf-8 set number relativenumber set tabstop=4 set shiftwidth=4 set scrolloff=2 set wildmode=longest,list,full set splitbelow set splitright set vb " No bell " Searching set ignorecase set wrapscan set incsearch " Line size marking highlight ColorColumn ctermbg=darkblue ctermfg=black "Redjail Bomb (thx Damian Conway!) "highlight ColorColumn ctermbg=red ctermfg=blue "exec 'set colorcolumn='.join(range(2,80,3), ',') " Completion color highlight Pmenu ctermbg=blue ctermfg=black highlight PmenuSel ctermbg=darkblue ctermfg=white " Panel border color highlight VertSplit ctermbg=black ctermfg=darkblue " Symbol pairs match color highlight MatchParen ctermbg=cyan ctermfg=black " Errors colors highlight Error ctermbg=red ctermfg=black highlight SpellBad ctermbg=red ctermfg=black " Filetypes filetype indent plugin on au BufRead,BufNewFile *.pu set filetype=plantuml au BufRead,BufNewFile *.puml set filetype=plantuml au BufRead,BufNewFile *.g set filetype=antlr3 au BufRead,BufNewFile *.g4 set filetype=antlr4 " hlnext: Highlighting searches nnoremap n n:call HLNext(0.1) nnoremap N N:call HLNext(0.1) function! HLNext(blinktime) set invcursorline redraw exec 'sleep'.float2nr(a:blinktime*1000).'m' set invcursorline redraw endfunction " dragvisuals: dragging visual blocks vmap DVB_Drag('left') vmap DVB_Drag('right') vmap DVB_Drag('down') vmap DVB_Drag('up') vmap D DVB_Duplicate() " Showing tabs "exec "set listchars=tab:\uBB\uBB,trail:\uB7,nbsp:~" exec "set listchars=tab:\uBB·,trail:\uB7,nbsp:~" nnoremap l :set list! " For deoplete let g:deoplete#enable_at_startup = 1 call deoplete#custom#option({ \ 'auto_complete': v:true, \ 'auto_complete_delay': 0, \ 'smart_case': v:true, \ }) call deoplete#custom#option('sources', { \ '_': ['ale'], \}) " For YouCompleteMe "let g:ycm_auto_trigger = 0 "let g:ycm_autoclose_preview_window_after_insertion = 1 " For syntastic "set statusline+=%#warningmsg# "set statusline+=%{SyntasticStatuslineFlag()} "set statusline+=%* "let g:syntastic_cs_checkers = ['code_checker'] "let g:syntastic_enable_signs = 1 "let g:syntastic_aggregate_errors = 1 "let g:syntastic_always_populate_loc_list = 1 "let g:syntastic_auto_loc_list = 2 "let g:syntastic_check_on_open = 1 "let g:syntastic_check_on_wq = 0 " For omnisharp "let g:OmniSharp_server_stdio = 1 "let g:OmniSharp_server_path = '/home/taamas/repos/omnisharp-roslyn/artifacts/scripts/OmniSharp.Stdio' "let g:OmniSharp_selector_ui = 'fzf' " For cursor shape with tmux if exists('$TMUX') let &t_SI = "\Ptmux;\\e[5 q\\\" let &t_EI = "\Ptmux;\\e[2 q\\\" else let &t_SI = "\e[5 q" let &t_EI = "\e[2 q" endif "if empty($TMUX) " let &t_SI = "\]50;CursorShape=1\x7" " Vertical bar in insert mode " let &t_EI = "\]50;CursorShape=0\x7" " Block in normal mode "else " let &t_SI = "\Ptmux;\\]50;CursorShape=1\x7\\\" " let &t_EI = "\Ptmux;\\]50;CursorShape=0\x7\\\" "endif "if &term =~ '^screen' " " tmux will send xterm-style keys when its xterm-keys option is on " execute "set =\e[1;*A" " execute "set =\e[1;*B" " execute "set =\e[1;*C" " execute "set =\e[1;*D" "endif " For vim-airline if !exists('g:airline_symbols') let g:airline_symbols = {} endif let g:airline_left_sep='' let g:airline_right_sep='' let g:airline_symbols.linenr = '🔃' let g:airline_symbols.maxlinenr = '↩' " For vimwiki " filetype plugin on let g:vimwiki_ext2syntax = {'.md': 'markdown', '.markdown': 'markdown', '.mdown': 'markdown'} let g:vimwiki_list = [{'path': '~/docs/vimwiki/', 'syntax': 'markdown', 'ext': '.md'}, \ {'path': '~/docs/notes/', 'syntax': 'markdown', 'ext': '.md'}, \ {'path': '~/games/dungeonesYDragones/tarkba/vimwiki/', 'syntax': 'markdown', 'ext': '.md'}, \ {'path': '~/games/dungeonesYDragones/creaciones/vimwiki/', 'syntax': 'markdown', 'ext': '.md'}] " Vertical split character set fillchars+=vert:█ " Shortcuts for split navigation map h map j map k map l map < map + map - map > map 10< map 5+ map 5- map 10> nnoremap f :40Vexplore nnoremap F :40Lexplore nnoremap :tabnew "nnoremap gt "Can't be set without also remapping "nnoremap gT nnoremap S :!tmux split-window -p 40 nnoremap / /grtfjx " Color syntax enable syntax on "Clean trailing whitespaces on save autocmd BufWritePre * %s/\s\+$//e " Autoupdate ~/.Xresources autocmd BufWritePost ~/.Xresources !xrdb % " Generate ~/.mainpage/urls on ~/.config/qutebrowser save autocmd BufWritePost ~/.config/qutebrowser/config.py !cat .config/qutebrowser/config.py | grep -e \'.*\':\ \'.*{}.*\' | grep -v DEFAULT | sed 's/,//' | sed 's/^\ *//' > ~/.mainpage/urls """ Remaps """ nnoremap Y y$ nnoremap ss :set spell! nnoremap sl :set spelllang= nnoremap sL :setlocal spelllang= nnoremap e :Errors nnoremap x :w:! ./% inoremap w :w inoremap /<++>cf> nnoremap p "+p nnoremap y "+yy vnoremap y "+y nnoremap d "+dd vnoremap d "+d nnoremap G :Goyo \| set linebreak " For LimeLight let g:limelight_conceal_ctermfg = 7 "" git nnoremap gs :!git status "nnoremap gpull :!git pull nnoremap ga :!git add % nnoremap gp :!git push nnoremap gc :!git commit -m "