Last active
April 29, 2017 04:09
-
-
Save gaurav/671221 to your computer and use it in GitHub Desktop.
My .vimrc file
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
" Activate pathogen. | |
call pathogen#infect() | |
call pathogen#helptags() | |
" These are a few of my favourite settings. | |
syntax on | |
set background=dark | |
set hlsearch | |
set incsearch | |
set smartindent | |
set fileencoding=utf8 | |
set mouse=n | |
colorscheme murphy | |
" Colour column 80 so I know where it is. | |
set colorcolumn=80 | |
" And wrap at words. | |
set wrap linebreak nolist | |
" VimR and MacVim have their own settings. | |
if has("gui_macvim") || has("gui_vimr") | |
set guifont=Menlo:h20 | |
endif | |
" virtual tabstops using spaces | |
set shiftwidth=4 | |
set softtabstop=4 | |
set expandtab | |
" allow toggling between local and default mode | |
function TabToggle() | |
if &expandtab | |
set shiftwidth=8 | |
set softtabstop=0 | |
set noexpandtab | |
else | |
set shiftwidth=4 | |
set softtabstop=4 | |
set expandtab | |
endif | |
endfunction | |
nmap <tab><tab><tab> mz:execute TabToggle()<CR>'z | |
augroup filetypedetect | |
au! BufRead,BufNewFile *.t setfiletype perl | |
au! BufRead,BufNewFile *.ru setfiletype ruby | |
au! BufRead,BufNewFile *.rad setfiletype html | |
au! BufRead,BufNewFile *.owl setfiletype xml | |
augroup END | |
" Vim 8 seems fussy about backspace, so: | |
set backspace=indent,eol,start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment