Created
August 6, 2014 20:29
-
-
Save ahmadajmi/cc1d273804552ff79cff 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
" No compatibility | |
set nocompatible | |
set encoding=utf-8 | |
set exrc " load vimrc from current directory | |
execute pathogen#infect() | |
filetype plugin indent on | |
set ruler | |
set cursorline | |
execute pathogen#infect() | |
syntax on | |
syntax enable | |
" Syntax highlight for .ejs files | |
if has("autocmd") | |
au BufRead,BufNewFile *.ejs setfiletype html | |
endif | |
" Line numbering and cursor on current line & ruler | |
set number | |
set numberwidth=3 | |
set cursorline | |
set ruler | |
nmap <C-N> :set invnumber<CR> " Ctrl-N show & hide line numbers | |
"" Whitespace | |
set nowrap " don't wrap lines | |
set tabstop=2 " a tab is two spaces | |
set shiftwidth=2 " an autoindent (with <<) is two spaces | |
set expandtab " use spaces, not tabs | |
set backspace=indent,eol,start " backspace through everything in insert mode | |
" Solarized stuff | |
set background=dark | |
colorscheme solarized | |
" Give a shortcut key to NERD Tree | |
map <F2> :NERDTreeToggle<CR> | |
" Start Nerdtree on startup | |
autocmd VimEnter * NERDTree | |
autocmd BufEnter * NERDTreeMirror | |
" Disable arrow keys (hardcore) | |
map <up> <nop> | |
imap <up> <nop> | |
map <down> <nop> | |
imap <down> <nop> | |
map <left> <nop> | |
imap <left> <nop> | |
map <right> <nop> | |
imap <right> <nop> | |
" Open new split panes to right and bottom, which feels more natural | |
set splitbelow | |
set splitright | |
" Quicker window movement | |
nnoremap <C-j> <C-w>j | |
nnoremap <C-k> <C-w>k | |
nnoremap <C-h> <C-w>h | |
nnoremap <C-l> <C-w>l | |
set runtimepath^=~/.vim/bundle/ctrlp.vim |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment