Created
April 29, 2012 17:59
-
-
Save neotohin-snippet/2552270 to your computer and use it in GitHub Desktop.
vimrc
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
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" => General | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Sets how many lines of history VIM has to remember | |
set history=700 | |
" Increasing undo limits | |
set undolevels=1000 | |
" Enable filetype plugin | |
filetype plugin on | |
filetype indent on | |
" Set to auto read when a file is changed from the outside | |
set autoread | |
" Changing leader \ to , character for better usage | |
let mapleader="," | |
" Pastes with paste mode this way it does not breaks | |
set pastetoggle=<F2> | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" => Text, tab and indent related | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
set expandtab | |
set shiftwidth=2 | |
set tabstop=2 | |
set smarttab | |
set lbr | |
set tw=500 | |
set ai "Auto indent | |
set si "Smart indet | |
set wrap "Wrap lines | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" => GENERAL SETTINGS | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
set number | |
syntax on "Enable syntax hl | |
" set mouse=a | |
set ruler | |
set title | |
set hid "Change buffer - without saving | |
set cmdheight=2 "The commandbar height | |
" Tab completion make sense | |
set wildmode=longest:full | |
set wildmenu | |
" Set backspace config | |
set backspace=eol,start,indent | |
set whichwrap+=<,>,h,l | |
set hlsearch "Highlight search things | |
set incsearch "Make search act like search in modern browsers | |
" Query highlight in string | |
let php_sql_query = 1 | |
let php_parent_error_close = 1 | |
let php_noShortTags = 1 | |
let php_htmlInStrings = 1 | |
set showmatch "Show matching bracets when text indicator is over them | |
set mat=2 "How many tenths of a second to blink | |
"folding settings | |
set foldmethod=indent "fold based on indent | |
set foldnestmax=10 "deepest fold is 10 levels | |
set nofoldenable "dont fold by default | |
set foldlevel=1 "this is just what i use | |
"Changes directory to opened file | |
set autochdir | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" This section is drupal file extension detection | |
" For snipmate | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
augroup drupal | |
autocmd BufRead,BufNewFile *.module set filetype=php.drupal | |
autocmd BufRead,BufNewFile *.theme set filetype=php.drupal | |
autocmd BufRead,BufNewFile *.inc set filetype=php.drupal | |
autocmd BufRead,BufNewFile *.install set filetype=php.drupal | |
autocmd BufRead,BufNewFile *.info set filetype=php.drupal | |
autocmd BufRead,BufNewFile *.engine set filetype=php.drupal | |
autocmd BufRead,BufNewFile *.profile set filetype=php.drupal | |
autocmd BufRead,BufNewFile *.test set filetype=php.drupal | |
augroup END | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Pathogen plugins configuration to load plugins from ~/.vim/bundle | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
call pathogen#helptags() | |
call pathogen#runtime_append_all_bundles() | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Nerdtree Configuration | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
map <Leader>n :NERDTreeToggle<CR> | |
map <Leader>s :w<CR> | |
map <Leader>x :q<CR> | |
map <Leader>q :qa<CR> | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Few common mistakes that i do while programming | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
abbr funciton function | |
"Sections from amix.dk | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" => Colors and Fonts | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
syntax enable "Enable syntax hl | |
"set gfn=Monospace\ 10 | |
"set shell=/bin/bash | |
"set guioptions-=T | |
"set t_Co=256 | |
"set background=dark | |
"colorscheme wombat | |
"set nonu | |
" | |
"set encoding=utf8 | |
" | |
"set ffs=unix,dos,mac "Default file types | |
"""""""""""""""""""""""""""""" | |
" => bufExplorer plugin | |
"""""""""""""""""""""""""""""" | |
let g:bufExplorerDefaultHelp=0 | |
let g:bufExplorerShowRelativePath=1 | |
let g:bufExplorerFindActive=1 | |
let g:bufExplorerSortBy='name' | |
map <leader>o :BufExplorer<cr> | |
"""""""""""""""""""""""""""""" | |
" => Yankring plugin | |
"""""""""""""""""""""""""""""" | |
nnoremap <silent> <F3> :YRShow<cr> | |
inoremap <silent> <F3> <ESC>:YRShow<cr> | |
"""""""""""""""""""""""""""""" | |
" => Minibuffer plugin | |
"""""""""""""""""""""""""""""" | |
let g:miniBufExplModSelTarget = 1 | |
let g:miniBufExplorerMoreThanOne = 0 | |
let g:miniBufExplModSelTarget = 0 | |
let g:miniBufExplUseSingleClick = 1 | |
let g:miniBufExplMapWindowNavVim = 1 | |
let g:miniBufExplVSplit = 30 | |
let g:miniBufExplSplitBelow=1 | |
autocmd BufRead,BufNew :call UMiniBufExplorer | |
map <leader>u :TMiniBufExplorer<cr> | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" => MISC | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" Remove the Windows ^M - when the encodings gets messed up | |
noremap <Leader>wm mmHmt:%s/<C-V><cr>//ge<cr>'tzt'm | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment