Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- " ~/.vimrc
- " Basic Settings
- set nocompatible " vim defaults (not vi)
- syntax on " enable syntax highlighting
- filetype on " detect filetype
- filetype plugin on
- filetype plugin indent on
- set encoding=utf-8
- set fileencoding=utf-8
- set backspace=indent,eol,start " backspace erases in insert mode
- set ruler " show line/character in statusbar
- set showcmd " show partial command in status line
- set wrap " wrap lines automatically (create new line)
- "set number " show line numbers
- set t_vb='' " turn off visual bells
- set backupdir=$HOME/.vim/backup,/tmp " swap file directory to avoid clutter
- " Tab Settings
- set tabstop=2 " tab character amount
- set expandtab " tabs as space
- set smartindent " smart autoindenting on a new line
- set shiftwidth=2 " number of spaces for autoindent
- set softtabstop=2
- " Folding
- set foldcolumn=0
- set foldmethod=syntax
- set foldlevelstart=1
- " Navigation
- set nostartofline " navigate closest column character(up/down)
- set showtabline=2 " tab bar always on
- "set showmatch " bouncy parenthesis
- " Appearance
- if &term=="xterm" " use 256 color palette if available
- set t_Co=256
- colorscheme wombat256
- endif
- "if &t_Co == 256 || &t_Co == 88
- " colorscheme wombat256
- "endif
- set cursorline " highlight current line (disable underline)
- hi CursorLine term=none cterm=none
- " Search
- set hlsearch " highlight searches
- set incsearch " highlight immediately
- set ignorecase " non-case-sensitive searches
- set smartcase " additional parameters for above
- " Others
- set wildmenu " setting menu tab completion
- set wildignore+=*.o,*~,.lo
- set suffixes+=.in,.a
- :set formatoptions=l " break comment lines...
- :set lbr " but not at middle of words
- "autocmd bufwritepre * :%s/\s\+$//e " remove trailing whitespaces when saving
- set mouse= " mouse navigation (tabs, cursor...)
- " (n)ormal, (c)ommand, (i)nsert, (a)ll
- " interferes w/ pasting from x clipboard
- " Key mappings
- map <F1> <nop> " disable F1 help, use :help instead
- set pastetoggle=<F3> " disable autoindent when pasting
- imap <F4> <Esc> " easier to reach Esc
- nn <F5> :setlocal spell! spell?<CR> " spelling toggle
- vmap <F7> :!xclip -f -sel clip<CR> " copy text to xorg server clipboard
- map <F8> :-1r !xclip -o -sel p<CR> " paste from xserv clip (middle)
- map <F9> <Esc>:set mouse=<CR> " mouse support off
- map <F10> <Esc>:set mouse=ni<CR> " mouse support on
- map <CR> o<Esc> " newline with Enter (command-mode)
- noremap <C-J> gj " wrapped line navigation
- noremap <C-K> gk
- " space bar un-highlights search
- :noremap <silent> <Space> :silent noh<Bar>echo<CR>
- " Unused
- " set listchars=tab:.\ ,trail:• " make trail space and tabs with bullet
- " set list
Advertisement
Add Comment
Please, Sign In to add comment