Created
October 22, 2017 01:46
-
-
Save pnappa/7dd98ac9397827ed2052b4c31a5773f2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" The hell that is my vimrc | |
set nocompatible " be iMproved, required | |
filetype off " required | |
"powerline | |
"set rtp+=/home/pnappa/.local/lib/python3.5/site-packages/powerline/bindings/vim/ | |
"set laststatus=2 | |
" fzf | |
" set rtp+=~/.fzf | |
""" PATHOGEN | |
execute pathogen#infect() | |
""" VUNDLE | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'VundleVim/Vundle.vim' | |
Plugin '907th/vim-auto-save' | |
Plugin 'rust-lang/rust.vim' | |
Plugin 'mzlogin/vim-smali' | |
Plugin 'vim-airline/vim-airline' | |
Plugin 'vim-airline/vim-airline-themes' | |
call vundle#end() | |
filetype plugin indent on | |
"" statico.github.io/vim.html | |
nnoremap j gj | |
nnoremap k gk | |
cnoremap <C-a> <Home> | |
cnoremap <C-b> <Left> | |
cnoremap <C-f> <Right> | |
cnoremap <C-d> <Delete> | |
cnoremap <M-b> <S-Left> | |
cnoremap <M-f> <S-Right> | |
cnoremap <M-d> <S-right><Delete> | |
cnoremap <Esc>b <S-Left> | |
cnoremap <Esc>f <S-Right> | |
cnoremap <Esc>d <S-right><Delete> | |
cnoremap <C-g> <C-c> | |
set incsearch | |
set ignorecase | |
set smartcase | |
set hlsearch | |
nmap \q :nohlsearch<CR> | |
" toggle tab style | |
nmap \t :set expandtab tabstop=4 shiftwidth=4 softtabstop=4<CR> | |
nmap \T :set expandtab tabstop=8 shiftwidth=8 softtabstop=4<CR> | |
nmap \M :set noexpandtab tabstop=8 softtabstop=4 shiftwidth=4<CR> | |
nmap \m :set expandtab tabstop=2 shiftwidth=2 softtabstop=2<CR> | |
"" end statico | |
" ycm | |
let g:ycm_global_ycm_extra_conf = "~/.vim/.ycm_extra_conf.py" | |
let g:ycm_confirm_extra_conf = 0 | |
let g:ycm_autoclose_preview_window_after_insertion = 1 | |
" end ycm | |
set number | |
syntax on | |
filetype plugin indent on | |
set tabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
colorscheme gruvbox | |
set background=dark | |
let g:gruvbox_italic=1 | |
" nerdtree | |
map <C-n> :NERDTreeToggle<CR> | |
"close if last window is nerdtree | |
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif | |
set undofile | |
set undodir=$HOME/.vim/undo | |
set undolevels=1000 | |
set undoreload=10000 | |
set spelllang=en_au | |
autocmd FileType latex,tex,md,markdown setlocal spell | |
" only enable autosave on local files | |
au BufEnter * :if expand("<afile>") !~ '^\a\+://' | let g:auto_save = 1 | endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment