Last active
October 21, 2015 22:35
-
-
Save psineur/0cd5e66baec7de9564c5 to your computer and use it in GitHub Desktop.
~/.vimrc
This file contains hidden or 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
set nocompatible | |
syntax enable | |
set background=dark | |
"Commented out overlength redness | |
"highlight OverLength ctermbg=red ctermfg=white guibg=#592929 | |
"match OverLength /\%81v.\+/ | |
" | |
" Trim whitespace on save | |
autocmd BufWritePre * :%s/\s\+$//e | |
:filetype plugin on | |
:syntax on | |
set autoread "does this work? I do :e if file may have changed anyway and saw a warning once when it was changed and i tried to :w | |
set wildmenu "allow completions in menu | |
"search for any case when typed in lower, use case when typed with different capitalization | |
set ignorecase | |
set smartcase | |
set hlsearch | |
set incsearch | |
set encoding=utf8 | |
" no backup | |
set nobackup | |
set nowb | |
set noswapfile | |
set expandtab | |
set smarttab | |
set shiftwidth=2 | |
set tabstop=2 | |
set ai "Auto indent | |
set si "Smart indent | |
set wrap "Wrap lines | |
" Visual mode pressing * or # searches for the current selection | |
" Super useful! From an idea by Michael Naumann | |
vnoremap <silent> * :call VisualSelection('f')<CR> | |
vnoremap <silent> # :call VisualSelection('b')<CR> | |
" Navigation arrows settings | |
imap <C-a> <Home> | |
imap <C-e> <End> | |
set whichwrap+=<,>,h,l,[,] | |
" tab navigation - I use tmux, so don't need this really | |
" PLUS IT CONFLICTS WITH TAB STACK CTRL+T WHICH I REALLY LOVE | |
" nnoremap <C-S-tab> :tabprevious<CR> | |
" nnoremap <C-tab> :tabnext<CR> | |
" nnoremap <C-t> :tabnew<CR> | |
" inoremap <C-S-tab> <Esc>:tabprevious<CR>i | |
" inoremap <C-tab> <Esc>:tabnext<CR>i | |
" inoremap <C-t> <Esc>:tabnew<CR> | |
" inoremap <C-S-W> <Esc>:tabclose<CR>i | |
" nnoremap <C-S-W> <Esc>:tabclose<CR> | |
" Return to last edit position when opening files (You want this!) | |
autocmd BufReadPost * | |
\ if line("'\"") > 0 && line("'\"") <= line("$") | | |
\ exe "normal! g`\"" | | |
\ endif | |
set viminfo^=% "no idea what this does | |
set laststatus=2 "always show status line | |
set statusline=\%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l | |
"go to the actual start of useful info on "0", not the 0-column | |
map 0 ^ | |
"everyone hates \t | |
syn match tab display "\t" | |
hi link tab Error | |
"show line numbers + make them blue in insert mode | |
set number | |
au InsertEnter * hi LineNr ctermfg=blue | |
au InsertLeave * hi LineNr ctermfg=yellow | |
" show crosshair where cursor is | |
set cursorline | |
set cursorcolumn | |
" Pathogen Bundles | |
execute pathogen#infect() | |
" Map CommandT plugin to OO | |
command! -nargs=0 OO CommandT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment