Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- " _
- " __ _(_)_ __ ___ _ __ ___
- " \ \ / / | '_ ` _ \| '__/ __|
- " \ V /| | | | | | | | | (__
- " \_/ |_|_| |_| |_|_| \___|
- " systems clipboard
- set clipboard=unnamedplus
- " Load pathogen for plugins:
- execute pathogen#infect()
- let $RUNTIMEPATH .= ':/home/jaime/.vim/colors/'
- " Basics
- set t_Co=256
- syntax on
- filetype plugin indent on
- set nocompatible
- set number
- set relativenumber
- set encoding=utf-8
- set fileencoding=utf-8
- " folding
- set foldmethod=indent
- set foldlevel=99
- let g:SimpylFold_docstring_preview = 1
- " Enable folding with the spacebar
- nnoremap <space> za
- " Colors Spell-Check
- hi Visual ctermbg=234
- hi SpellBad term=reverse ctermbg=red gui=undercurl guisp=Red
- hi SpellCap term=reverse ctermbg=81 gui=undercurl guisp=Blue
- hi SpellRare term=reverse ctermbg=225 gui=undercurl guisp=Magenta
- hi SpellLocal term=reverse ctermbg=14 gui=undercurl guisp=DarkCyan
- " Splits open at the bottom and right, which is non-retarded, unlike vim defaults.
- set splitbelow
- set splitright
- " Use ctrl-[hjkl] to select the active split!
- nmap <silent> <c-k> :wincmd k<CR>
- nmap <silent> <c-j> :wincmd j<CR>
- nmap <silent> <c-h> :wincmd h<CR>
- nmap <silent> <c-l> :wincmd l<CR>
- " Get line, word and character counts with F3:
- map <F3> :!wc <C-R>%<CR>
- " English Spell-check set to F6:
- map <F6> :setlocal spell! spelllang=en_us<CR>
- "" German Spell-check set to F7:
- map <F7> :NERDTreeToggle<CR>
- map <F8> :Goyo \| set linebreak<CR>
- " Automatically deletes all tralling whitespaces on save.
- autocmd BufWritePre * %s/\s\+$//e
- " Disables automatic commenting on newline:
- autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
- " .tex files automatically detected
- autocmd BufRead,BufNewFile *.tex set filetype=tex
- " .py files automatically detected
- autocmd BufRead,BufNewFile *.py set filetype=python
- set linebreak
- set showbreak=+++
- set showmatch
- set visualbell
- set hlsearch
- set smartcase
- set ignorecase
- set incsearch
- set autoindent
- set expandtab
- set shiftwidth=4
- set smartindent
- set softtabstop=4
- set ruler
- set undolevels=1000
- set backspace=indent,eol,start
- set swapfile
- set dir=/tmp
- set nobackup
- "========="
- " PLUGINS "
- "========="
- " vim-multiple-cursors
- let g:multi_cursor_use_default_mapping=0
- " jedi vim
- let g:jedi#popup_on_dot = 0
- " let g:jedi#use_tabs_not_buffers = 1
- " Default mapping
- let g:multi_cursor_start_word_key = '<C-n>'
- let g:multi_cursor_select_all_word_key = '<A-n>'
- let g:multi_cursor_start_key = 'g<C-n>'
- let g:multi_cursor_select_all_key = 'g<A-n>'
- let g:multi_cursor_next_key = '<C-n>'
- let g:multi_cursor_prev_key = '<C-p>'
- let g:multi_cursor_skip_key = '<C-x>'
- let g:multi_cursor_quit_key = '<Esc>'
- " ____ _ _
- "/ ___| _ __ (_)_ __ _ __ ___| |_ ___
- "\___ \| '_ \| | '_ \| '_ \ / _ \ __/ __|
- " ___) | | | | | |_) | |_) | __/ |_\__ \
- "|____/|_| |_|_| .__/| .__/ \___|\__|___/
- " |_| |_|
- "" Navigating with guides
- " inoremap <Space><Tab> <Esc>/<++><Enter>"_c4l
- " vnoremap <Space><Tab> <Esc>/<++><Enter>"_c4l
- " map <Space><Tab> <Esc>/<++><Enter>"_c4l
- """ Latex
- " Navigating with guides
- autocmd FileType tex inoremap <Space><Tab> <Esc>/<++><Enter>"_c4l
- autocmd FileType tex vnoremap <Space><Tab> <Esc>/<++><Enter>"_c4l
- autocmd FileType tex map <Space><Tab> <Esc>/<++><Enter>"_c4l
- " Text width
- autocmd FileType tex set textwidth=80
- " Word count
- autocmd FileType tex map <F3> :w !detex \| wc -w<CR>
- autocmd FileType tex inoremap <F3> <Esc>:w !detex \| wc -w<CR>
- " Code snippets
- autocmd FileType tex inoremap ,sec \section{}<Enter><++><Esc>1kf}i
- autocmd FileType tex inoremap ,ssec \subsection{}<Enter><++><Esc>1kf}i
- autocmd FileType tex inoremap ,sssec \subsubsection{}<Enter><++><Esc>1kf}i
- autocmd FileType tex inoremap ,art \documentclass{article}<enter>
- autocmd FileType tex inoremap ,doc \begin{document}<enter><enter>\end{document}<esc>kA
- autocmd FileType tex inoremap ,up \usepackage{}<enter><++><esc>kf}i
- autocmd FileType tex inoremap ,it \textit{}<++><Esc>T{i
- autocmd FileType tex inoremap ,bf \textbf{}<++><Esc>T{i
- autocmd FileType tex inoremap ,$ $$<++><Esc>4hi
- autocmd FileType tex inoremap ,eq \begin{equation}<Enter><Enter>\end{equation}<Enter><++><Esc>2kA<tab>
- autocmd FileType tex inoremap ,fr \frac{}{<++>}<++><Esc>ba
- autocmd FileType tex inoremap ,ve \vec{}<++><Esc>ba
- """" Python
- " save and run python script
- autocmd FileType python nnoremap <buffer> <F9> :w<enter> :exec '!python' shellescape(@%, 1)<cr>
- " " Navigating with guides
- " autocmd FileType python inoremap <Space><Tab> <Esc>/<++><Enter>"_c4l
- " autocmd FileType python vnoremap <Space><Tab> <Esc>/<++><Enter>"_c4l
- " autocmd FileType python map <Space><Tab> <Esc>/<++><Enter>"_c4l
- "
- " " Code snippets
- " autocmd FileType python inoremap ,pr print()<enter><++><esc>k$i
- " autocmd FileType python inoremap ,rl range(len())<++><esc>ba
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement