" Vundle stuff starts here set nocompatible filetype off set rtp+=~/.vim/bundle/Vundle.vim call vundle#begin() Plugin 'VundleVim/Vundle.vim' Plugin 'scrooloose/nerdtree' Plugin 'tpope/vim-fugitive' Plugin 'tpope/vim-surround' Plugin 'junegunn/goyo.vim' Plugin 'tpope/vim-commentary' Plugin 'dracula/vim' Plugin 'drewtempelmeyer/palenight.vim' Plugin 'dracula/vim', {'name':'dracula'} Plugin 'simeji/winresizer' Plugin 'rakr/vim-one' Plugin 'tomasr/molokai' Plugin 'junegunn/fzf.vim' Plugin 'chriskempson/base16-vim' Plugin 'dhruvasagar/vim-table-mode' call vundle#end() " Vundle stuff ends here set tabstop=4 " number of visual spaces per tab set softtabstop=4 " number of spaces in the tab when editing set expandtab " tabs are shortcut for spaces set shiftwidth=4 syntax enable " enalbe syntax processing set smartindent " when opening a new line, keep the same indentation if no " file-specific indenting is enabled set autoindent " set viminfo='10,<100,:100,%,n~/.vim/.viminfo set undofile set mouse=a set background=dark colorscheme base16-classic-dark set termguicolors " load filetype-specific indent files filetype plugin indent on " compiling for different file types " autocmd FileType markdown nnoremap cm :w:!pandoc -f gfm -V geometry=margin=0.75in --resource-path="expand('%:p:h')/img" -V links-as-notes -o %.pdf % "autocmd FileType markdown nnoremap cm :w:!pandoc -f markdown+raw_tex -V geometry=margin=0.75in -V papersize=A4 -o pdf/%.pdf % " autocmd FileType markdown nnoremap cm :w:!pandoc -H ~/.config/header -f markdown+raw_tex+raw_attribute -o pdf/%.pdf % " autocmd FileType markdown nnoremap cm :w:!pandoc -f markdown+raw_tex+raw_attribute -o pdf/%.pdf % autocmd FileType tex nnoremap cm :w:!xelatex % 1&>/dev/null " autocmd FileType tex nnoremap cm :w:!pdflatex -interaction nonstopmode % 1&>/dev/null autocmd FileType html setlocal ts=2 sts=2 sw=2 " autocmd FileType c nnoremap cp :w:!clear && gcc % && ./a.out autocmd BufRead *.pdentry :Goyo autocmd BufRead *.pdentry set nosmartindent " leader is comma let mapleader="," " QuickFix Navigation nnoremap cn :cn nnoremap cN :cN set backspace=indent,eol,start " visual autocomplete for command menu set wildmenu " redraw only when we need to set lazyredraw " highligt matching [{()}] set showmatch hi MatchParen cterm=none ctermbg=none ctermfg=white set incsearch "search as characters are entered "set hlsearch " highlight search matches " turn off search highlight nnoremap :nohlsearch nnoremap ihs i\texthindi{:r !zenity --entry --width=800kJxA} nnoremap ih :r !zenity --entry --width=800 nnoremap iim i![](img/){width=80%}F) set foldenable " enable folding set foldlevelstart=10 " open most folds by default set foldnestmax=10 " 10 nested folds max set foldmethod=indent " fold based on indent " is foldToggle (za) in normal mode nnoremap @=(foldlevel('.')?'za':"\") " in visual mode copies to clipboard vnoremap "+y nnoremap "+P map :NERDTreeToggle set number " number line set showcmd " show command in bottom bar " MOVEMENT " " allow to move around visualy by default nnoremap j gj nnoremap k gk " highlight last inserted text nnoremap gV `[v`] " Window splits control nnoremap nnoremap nnoremap nnoremap nnoremap :FZF nnoremap :Buffers nnoremap :Ag set autoread nnoremap r :e! nnoremap m :nohlsearch " replace the char with '✓' nnoremap o rOK " jk is escape inoremap jk let g:winresizer_start_key = 'e' let g:winresizer_vert_resize = 4 let g:winresizer_horiz_resize = 2 nmap gj :diffget //3 nmap gf :diffget //2 nmap gs :G " Use a blinking upright bar cursor in Insert mode, a blinking block in normal "if &term == 'xterm-256color' || &term == 'screen-256color' " let &t_SI = "\[5 q" " let &t_EI = "\[2 q" "endif " if exists('$TMUX') " let &t_EI = "\Ptmux;\\]50;CursorShape=0\x7\\\" " let &t_SI = "\Ptmux;\\]50;CursorShape=1\x7\\\" " endif " nnoremap n :w:!ns % let g:table_mode_corner_corner='+' let g:table_mode_header_fillchar='='