Skip to content

Instantly share code, notes, and snippets.

@gravitano
Last active January 4, 2016 15:59
Show Gist options
  • Save gravitano/8643868 to your computer and use it in GitHub Desktop.
Save gravitano/8643868 to your computer and use it in GitHub Desktop.
Vim Janus Ubuntu
set nocompatible 'Disable vim-compability
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L "Removes left hand scroll bar
set linespace=15
set showmode
set nowrap
set tabstop=4
set smarttab
set tags=tags
set softtabstop=4
set expandtab
set shiftwidth=4
set shiftround
set backspace=indent,eol,start
set autoindent
set copyindent
set number
set ignorecase
set smartcase
set timeout timeoutlen=200 ttimeoutlen=100
set visualbell.
set noerrorbells
set autowrite
set mouse=a
let mapleader = ","
let g:mapleader = ","
nmap <leader>w :w!<cr>
nnoremap j gj
nnoremap k gk
imap jj <esc>
nnoremap ,cd :cd %:p:h<CR>:pwd<CR>
'easier window navigation
nmap <C-h> <C-w>h
nmap <C-j> <C-w>j
nmap <C-k> <C-w>k
nmap <C-l> <C-w>l
"resize vsplit
nmap <C-v> :vertical resize +5<cr>
nmap <C-b> :NERDTreeToggle<cr>
"Load the current buffer in chrome
nmap ,c :!open -a Google\ Chrome<cr>
showcmd
nmap :sp :rightbelow sp<cr>
nmap :bp :BufSurfBack<cr>
nmap :bn :BufSurfForward<cr>
highlight Search cterm=underline
set backupdir=~/.vim/backup//
set directory=~/.vim/swap//
map <Leader>t :!phpunit %<cr>
let g:EasyMotion_leader_key = '<Leader>'
let g:Powerline_symbols = 'fancy'
set laststatus=2
set encoding=utf-8
set noshowmode
autocmd cursorhold * set nohlsearch
autocmd cursormoved * set hlsearch
command! H let @/=""
"autocmd CursorMovedI * if pumvisible() == 0!pclose|endif
"autocmd InsertLeave * if pumvisible() == 0!pclose|endif
abbrev pft PHPUnit_Framework_TestCase
abbrev gm !php artisan generate:model
abbrev gc !php artisan generate:controller
abbrev gmig !php artisan generate:migration
abbrev gf !php artisan generate:form
abbrev gsd !php artisan generate:seed
autocmd BufWritePre *.php :%s/\s\+$//e
nmap ,todo :e todo.txt<cr>
nmap <leader>lr :e app/routes.php<cr>
nmap <leader>lca :e app/config/app.php<cr>81Gf(%0
nmap <leader>lcd :e app/config/database.php<cr>
nmap <leader>lc :e composer.json<cr>
" Function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment