Spurred on by my recent experiences with the vi editor, I havedecided to shift from gedit to vi. The insert, command and visual notion was a bit difficult to get hang of at the beginning, but with some practice I am getting the hang of it. There’s so many more features in it than I have used till now. It needs a bit of getting used to.
The first thing I did was to customize my .vimrc file to suit my programming style. I like my code to be syntaxically coloured, indented and prefer spaces over tabs. Also I keep the width of my tabs to 2. I must mention here that most of my programming habbits are because of Udit Sajjanhar – the one semester that he was our TA for the course of compilers.
So here is my vimrc file :
" do not keep a backup file
set nobackup
" wrap off
set nowrap
" tabs are only 2 characters
set tabstop=2
" auto indent uses 2 charaters
set shiftwidth=2
" spaces instead of tabs
set expandtab
" set auto-indentation on
set autoindent
" expand command line using tab
set wildchar=
" show line numbers
set number
" fold using markers
set foldmethod=marker
" powerful backspaces
set backspace=indent,eol,start
" highlight search terms
set hlsearch
" dont wrap words
set textwidth=0
" history
set history=50
" 1000 undo levels
set undolevels=1000
" show partial commands
set showcmd
" show matching braces
set showmatch
" auto-detect the file type
filetype plugin indent on
" on the syntax by default
if has("syntax")
syntax on
endif
" When editing a file, always jump to the last known cursor position.
" Don't do it when the position is invalid or when inside an event handler
" (happens when dropping a file on gvim).
autocmd BufReadPost *
\ if line("'\"") > 0 &amp;amp;amp;amp;amp;amp;&amp;amp;amp;amp;amp;amp; line("'\"") <= line("$") |
\ exe "normal g`\"" |
\ endif
Here’s the file in case you want to download it : vimrc
Popularity: 2% [?]
Related posts:
![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=f95520f0-c355-4f24-8c54-d508759e506a)
got the answer for 30 but the page after that says level31
got the answer for 30 but the page after that says level31
it shows a pic with two fingers making a V , is it a puzzle too
it shows a pic with two fingers making a V , is it a puzzle too
naah … thats not a question .. you have successfully answered all the questions then
naah … thats not a question .. you have successfully answered all the questions then