In my last post, i explored couple of basic features about VIM. Here is an updated version of my .vimrc. It had some issues with the "hiding tabs" settings as well which is cured in this version (well it wasn't working on my office PC where i had vim 6 instead of 7)
""""""""""""""""""starts here
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Vim As Editor Settings
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" To enable syntax highlighting
syntax on
" come out of vim compatability mode, why go to old vi when we have vim
set nocompatible
" Detect type of the file
filetype on
" Load filetype plugins
filetype plugin on
" How many lines of history to remember
set history=1000
" To enable a color scheme that is pleasant to eyes
:colorscheme delek
" To convert tabs to spaces; use :retab to convert all tabs to current
" settings
set tabstop=4
set shiftwidth=4
set expandtab
" To catch hiding tabs
set list listchars=tab:>-,trail:-
" makes the backspace key treat the four spaces like a tab (so one backspace
" goes back a full 4 spaces)
set softtabstop=4
" enable line number
set number
" have mouse on vim all the time
set mouse=a
" load .vimrc whenever it is edited
autocmd! bufwritepost vimrc source ~/vim_local/vimrc
" Don't indent while pasting
set pastetoggle=<f3>
" Remove indenting on empty lines
map <f2> :%s/\s*$//g<cr>:noh<cr>''
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Vim UI
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" set title of the xterm to the name of the file
set title
" set the height of command bar to 2
set cmdheight=2
" Enable folding
set foldenable
" fold lines with similar indent (collapse feature) or manually in insert mode
" using CTRL-T (indent) CTRL-D (dedent)
set foldmethod=indent
" Don't autofold anything (but can be done manually)
set foldlevel=100
" Don't open folds when you search into them or undo
set foldopen-=search,undo
" show matching brackets
set showmatch
" how many tenths of a second to blink matching brackets for
set mat=5
" do not highlight searched for phrases
"set nohlsearch
" BUT do highlight as you type you search phrase
set incsearch
" show filename and other details about the buffer
set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [ASCII=\%03.3b]\ [HEX=\%02.2B]\ [POS=%04l,%04v][%p%%]\ [LEN=%L]
" keep showing the status
set laststatus=2
"allow backspace (b), space(s) and arrows to move the cursor to
"previous/next line
set whichwrap=b,s,<,>
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Auto-complete
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
"set complete-=i
" Turn on wild menu which shows auto-complete options in the command mode
set wildmenu
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" PHP
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
let php_sql_query=1
let php_htmlInStrings=1
let php_noShortTags=1
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" HTML
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" HTML entities - used by xml edit plugin
let xml_use_xhtml = 1
"let xml_no_auto_nesting = 1
"To HTML
let html_use_css = 1
let html_number_lines = 0
let use_xhtml = 1
""""""""""""""""""ends here
No comments:
Post a Comment