Skip to content

Instantly share code, notes, and snippets.

@nucklearproject
Last active December 10, 2015 02:28
Show Gist options
  • Save nucklearproject/4367375 to your computer and use it in GitHub Desktop.
Save nucklearproject/4367375 to your computer and use it in GitHub Desktop.
My .vimrc
" Pathogen
filetype off " Pathogen needs to run before plugin indent on
call pathogen#runtime_append_all_bundles()
call pathogen#helptags() " generate helptags for everything in 'runtimepath'
filetype plugin indent on
filetype plugin on
set autoindent
set cmdheight=1 "command bar is 2 high
set backspace=indent,eol,start "set backspace function
set hlsearch "highlight searched things
set incsearch "incremental search
set ignorecase "ignore case
set textwidth=0
set autoread "auto read when file is changed from outside
set ruler "show current position
set nu "show line number
set showmatch "show maching braces
set shiftwidth=2
set tabstop=2
set expandtab
set gfn=consolas\ 12 "unix
set gfn=Consolas:h12 "windoors
set t_Co=256
set wrap
set ai
set cursorline
set columns=135 "141
set lines=37 "38
"lineSpace
set lsp=4
"save on lost focus
au FocusLost * :wa
colorscheme darkblue2 "wombat
syntax on
"map zen
"let g:user_zen_expandabbr_key='<C-e>'
let g:user_zen_leader_key='<C-e>'
:set guioptions-=T
"http://valloric.github.com/MatchTagAlways/
"let g:mta_use_matchparen_group = 1
let g:mta_filetypes = {
\ 'html' : 1,
\ 'xhtml' : 1,
\ 'xml' : 1,
\ 'jinja' : 1,
\ 'php' : 1,
\ 'scss' : 1,
\ 'css' : 1
\}
"Shortcut personalizados
"map bnext bprev
nmap <silent> <F4> :NERDTreeToggle<CR>
"grabar e ir al siguiente o pre buffer
nmap<silent> <A-left> :w<CR>:bprev<CR>
nmap<silent> <A-right> :w<CR>:bnext<CR>
"cerrar buffer, previo a guardar el buffer ctr l
nmap<silent> <C-l> :w<CR>:bd<CR>
"guardar con ctrl+s
nmap<silent> <C-s> :w<CR>
"Toogle visual mode
nnoremap <C-space> i
imap <C-space> <Esc>
"dos veces ii en modo editor pasa a visual
imap ii <Esc>
"map buffexplorer
"noremap <silent> <F3> :BufExplorerHorizontalSplit<CR>
"open find and replace window
nmap <silent> <C-h> :promptrepl<CR>
nmap <silent> <C-f> :promptfind<CR>
"Display statusline always
"set laststatus=2
set statusline=%<%f\ %h%w%m%r%y%=L:%l/%L\ (%p%%)\ C:%c%V\ B:%o\ F:%{foldlevel('.')}
"Drupal detect filetypes
if has("autocmd")
" Drupal *.module and *.install files.
augroup module
autocmd BufRead,BufNewFile *.module set filetype=php
autocmd BufRead,BufNewFile *.install set filetype=php
autocmd BufRead,BufNewFile *.test set filetype=php
autocmd BufRead,BufNewFile *.inc set filetype=php
autocmd BufRead,BufNewFile *.profile set filetype=php
autocmd BufRead,BufNewFile *.view set filetype=php
augroup END
endif
syntax on
@nucklearproject
Copy link
Author

Tips:

clear last search highlighting
:noh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment