123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138 |
- """"""""""""""""""""""""""""""""
- " General
- """"""""""""""""""""""""""""""""
- " Use pathogen https://github.com/tpope/vim-pathogen
- execute pathogen#infect()
- filetype plugin indent on
- " Use vim-sensible https://github.com/tpope/vim-sensible
- " for default settings.
- "set ruler " Enables the ruler
- "set autoindent " Add indentation of previous line
- "set backspace=indent,eol,start " Use Backspace more intuitively
- "set complete-=i " <C-P> <C-N> for previous and next completion
- "set smarttab " Tab at the beginning of line adds shiftwidth spaces
- "set nrformats-=octal " Don't use octal as nr format
- "set ttimeout " Set the timeout for mapped keybindings
- "set ttimeoutlen=100 " Set timeout to 100ms
- "set incsearch " Don't wait for <CR>, start searching right away.
- "nnoremap <silent> <C-L> :nohlsearch<C-R>=has('diff')?'<Bar>diffupdate':''<CR><CR><C-L>
- " <C-L> switches off search result highlighting
- "set laststatus=2 " Always draw the status line
- "set wildmenu " Show expansion candidates in status line
- "set scrolloff=2 " Minimum number of lines above and below cursor
- "set sidescrolloff=5 " Minimum number of columns to keep (only in nowrap)
- "set display+=lastline
- "set encoding=utf-8
- "set listchars=tab:>\ ,trail:-,extends:>,precedes:<,nbsp:+
- "set formatoptions+=j " Delete comment characters when joining lines.
- "setglobal tags-=./tags tags-=./tags; tags^=./tags;
- "set shell=/bin/bash
- "set autoread " When a change is detected, auto reload the file
- "set history=1000
- "set tabpagemax=50
- "set viminfo^=!
- "set sessionoptions-=options
- "set t_Co=16
- "runtime! macros/matchit.vim
- "inoremap <C-U> <C-G>u<C-U>
- set backupdir=$HOME/.vim/backup_files//
- set directory=$HOME/.vim/swap_files//
- set undodir=$HOME/.vim/undo_files//
- " Use Syntastic https://github.com/vim-syntastic/syntastic
- " for syntax checks.
- let g:syntastic_javascript_checkers = ['standard']
- " JavaScript
- " Check syntax on write and fix formatting.
- autocmd bufwritepost *.js silent !standard --fix %
- " use , as map leader.
- let mapleader=","
- let g:mapleader=","
- " quick save with ,w
- nmap <leader>w :w!<cr>
- set cmdheight=2
- set hid
- set whichwrap+=<,>,h,l
- """""""""""
- " Searching
- """""""""""
- set hlsearch
- " ignore case when searching.
- set smartcase
- set lazyredraw
- set magic
- set showmatch
- set mat=2
- set noerrorbells
- set novisualbell
- set t_vb=
- set tm=500
- try
- colorscheme desert
- catch
- endtry
- set background=dark
- set ffs=unix,dos,mac
- set nobackup
- set nowb
- set noswapfile
- set expandtab
- set lbr
- set tw=500
- set smartindent
- set wrap
- " Keybindings
- map <leader>l :bnext<cr>
- map <leader>h :bprev<cr>
- map <leader>tn :tabnew<cr>
- map <leader>to :tabonly<cr>
- map <leader>tc :tabclose<cr>
- map <leader>tm :tabmove
- map <leader>t<leader> :tabnext<cr>
- set statusline=\ %F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l\ \ Column:\ %c
- map 0 ^
- set gdefault
- set number
- set background=dark
- set ffs=unix,dos,mac
- " Indentation
- set shiftwidth=2
- set softtabstop=2
|