Skip to content

Instantly share code, notes, and snippets.

@rystaf
Last active August 29, 2015 14:13
Show Gist options
  • Save rystaf/dc110788271a1b2aef80 to your computer and use it in GitHub Desktop.
Save rystaf/dc110788271a1b2aef80 to your computer and use it in GitHub Desktop.
filetype off
set nocompatible
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'kien/ctrlp.vim'
Plugin 'jellybeans.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'nginx.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'bling/vim-airline'
call vundle#end()
syntax on
filetype plugin indent on
set nu!
set ts=1 sw=1 et
set autoindent
set smartindent
set smarttab
set softtabstop=4
set backspace=indent,eol,start
set showmatch
set nobackup
set nowb
set noswapfile
set showcmd
set hidden
set autochdir
set scrolloff=8
set history=1000
set ruler
set incsearch
set ignorecase
set smartcase
set hlsearch
set foldmethod=manual
set pastetoggle=<F2>
let mapleader = ","
nnoremap <leader>d :NERDTreeToggle<cr>
nnoremap <leader>c :Gcommit<cr>
nnoremap <leader>w :Gwrite<cr>
nnoremap <leader>u :Gread<cr>
nnoremap <leader>s :Gstatus<cr>
inoremap jj <Esc>
nnoremap JJJJ <Nop>
" disable arrow keys
map <up> <nop>
map <down> <nop>
map <left> <nop>
map <right> <nop>
imap <up> <nop>
imap <down> <nop>
imap <left> <nop>
imap <right> <nop>
let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlP'
let g:ctrlp_working_path_mode = 'ra'
let g:ctrlp_custom_ignore = 'node_modules\|lib|git'
set guioptions-=L "remove scrollbar
set guioptions-=T "remove tool bar
set guioptions-=m "remove menu bar
nnoremap <silent> <Space> :nohlsearch<Bar>:echo<CR>
set encoding=utf-8
set laststatus=2
colorscheme jellybeans
let g:jellybeans_use_lowcolor_black = 0
set guifont=DejaVu_Sans_Mono_for_Powerline:h10
let g:airline_powerline_fonts = 1
set nocursorline
if has("gui_running")
set cursorline
" set guifont=DejaVu\ Sans\ Mono\ for\ Powerline\ 10
" let g:Powerline_symbols = 'fancy'
let g:indent_guides_auto_colors = 0
endif
if &term =~ "screen" || &term =~ "xterm" || &term =~ "screen-256color"
au BufRead,BufNewFile /etc/nginx/*,/usr/local/nginx/conf/* if &ft == '' | setfiletype nginx | endif
autocmd BufWinLeave *.* mkview
autocmd BufWinEnter *.* silent loadview
"256 color --
let &t_Co=256
" restore screen after quitting
set t_ti=ESC7ESC[rESC[?47h t_te=ESC[?47lESC8
if has("terminfo")
let &t_Sf="\ESC[3%p1%dm"
let &t_Sb="\ESC[4%p1%dm"
else
let &t_Sf="\ESC[3%dm"
let &t_Sb="\ESC[4%dm"
endif
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment