Created
January 11, 2012 13:18
-
-
Save simondlr/1594612 to your computer and use it in GitHub Desktop.
.vimrc of simondlr
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
set number "show line numbers | |
set numberwidth=1 "Line numbers width | |
set smartindent | |
set tabstop=4 "set tab character to 4 characters | |
set shiftwidth=4 "indent width for autoindent | |
"Show status line. | |
set laststatus=2 | |
set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{CurDir()}%h\ \ \ Line:\ %l/%L:%c | |
"Function to show current working directory | |
function! CurDir() | |
let curdir = substitute(getcwd(), '/Users/simon/', "~/", "g") | |
return curdir | |
endfunction | |
"Function to show whether you are in paste mode or not | |
function! HasPaste() | |
if &paste | |
return 'PASTE MODE ' | |
else | |
return '' | |
endif | |
endfunction | |
"invert paste mode | |
"use this instead of pastetoggle to redraw statusline | |
nnoremap <c-p> :set invpaste <CR> | |
"Shows cmd in right bottom corner | |
set showcmd | |
set t_Co=256 "Terminal colors | |
colorscheme desert256 "desert256 colorscheme: requires desert256 colorscheme | |
syntax on "enable syntax highligthing | |
"Nerdtree shortcut to open it: requires nerdtree plugin | |
map <c-n> :NERDTreeToggle<CR> | |
set showmatch "Show matching brackets |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment