Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- syntax on " syntax highlighting
- set winwidth=80 " characters per line - this is used when gq (autowrap)
- "set number
- set autoindent
- set ruler " shows position in status bar
- set ignorecase " when searching
- set smartcase " case matters when seach pattern has upper case
- set hlsearch " highlights found string on search
- set incsearch " search while typing
- filetype plugin indent on " this plugin is used for many more per-filetype plugins
- set ts=4 " tab stop - how many spaces will a tab character take (normally you should NOT have tab characters in your code)
- set sw=4 " shifts width - (un)indent amount
- set sts=4 " smart tab stop - handy with backspace (deletes four chars at once)
- set expandtab " use spaces instead of tabs
- color elflord " nice theme with dark background
- " you may find some of the following useful
- " set guioptions-=m " no menus
- " set guioptions-=T " no icons
- " set guioptions+=c " console dialog (vs popup)
- " set guioptions-=r " no left / right scrollbar
- " set guioptions-=l
- " set guioptions-=R
- " set guioptions-=L
- set guioptions=aci " autoselect, cui dialogs, icon <- for the console addicted
- if has('gui_running')
- set showtabline=2 " always show tab line - for some reason gvim will resize and go beyond desktop size when you create a new tab - with this option it always has the tab line
- set guifont=Monospace\ 9 " this font fits 4 buffers next to each other on 30' monitor
- endif
- set laststatus=2 " always show status line
- set mousefocus " focus follows mouse
- set mouse=a " mouse click and select behaves good in console vi(m)
- set formatoptions=1 " connected with the next one
- set lbr " word wrap (on word, not screen)
- set listchars=eol:$,tab:>-,trail:~,extends:>,precedes:< " how to see special (whitespace) characters - activate with "set list", deactivate with "set nolist"
- ":au BufWinEnter * let w:m1=matchadd('Search', '\%<81v.\%>77v', -1)
- :au BufWinEnter * let w:m2=matchadd('ErrorMsg', '\%>80v.\+', -1) " make everything above 80 chars appear RED - very annoying so you'll never have > 80 char lines :)
- " This makes the completion of commands complete only longest possible prefix (like bash), not to first possible (like zsh, vi default)
- " It also shows a menu so you can pick an option with the arrows
- set wildmode=longest:full
- set wildmenu
- imap <C-v> <Esc>pa
- " Easily move between many windows with alt + arrow keys / vi move keys
- nmap <M-Right> <C-W><Right>
- nmap <M-Left> <C-W><Left>
- nmap <M-Down> <C-W><Down>
- nmap <M-Up> <C-W><Up>
- nmap <M-l> <C-W><Right>
- nmap <M-h> <C-W><Left>
- nmap <M-j> <C-W><Down>
- nmap <M-k> <C-W><Up>
- " for javascript smartindent uses cindent, which indents all lines with colon (:) at the 0th column (because it thinks they are labels)
- " this is extremely annoying when defining objects in javascript - so disable smartindent for javascript
- au FileType javascript set nocindent
- " Default sass sw is 2, and from time to time it autoindents - ANNOYING. This fixes it.
- au FileType sass set sw=4
- call pathogen#infect()
Advertisement
Add Comment
Please, Sign In to add comment