Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- " ~/.vimrc
- " Basic Settings
- set nocompatible
- syntax on
- filetype on
- 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 number of lines selected in visual
- set wrap " wrap lines automatically (create new line)
- "set number " show line numbers
- " swap file directory to avoid clutter
- set backupdir=~/.vim/backup
- " break comment lines but not at middle of words
- :set formatoptions=l
- :set lbr
- " Appearance
- "colorscheme lettuce
- " use 256 color palette if available
- if &term=="xterm"
- set t_Co=256
- endif
- " highlight searches, searches begin immediately
- set hlsearch
- set incsearch
- " non-case-sensitive searches
- set ignorecase
- set smartcase
- " tab settings
- set tabstop=2 " tab character amount
- set expandtab " tabs as space
- set smartindent " smart autoindenting on a new line
- set shiftwidth=2 " set 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
- " visual bells give me seizures
- set t_vb=''
- " mouse support (cursor position, tab selection - hold shift to select text)
- " n = normal mode, i = insert, c = command, a = all
- set mouse=ni
- " setting menu tab completion
- set wildmenu
- set wildignore+=*.o,*~,.lo
- set suffixes+=.in,.a
- " Key mappings
- set pastetoggle=<F3> " disable autoindent when pasting
- imap <F4> <Esc> " easier to reach Esc
- nn <F5> :setlocal spell! spell?<CR> " spelling toggle
- map <F7> <Esc>:set mouse=<CR> " mouse support off
- map <F8> <Esc>:set mouse=ni<CR> " mouse support on
- vmap <F9> :!xclip -f -sel clip<CR> " copy text to xorg server clipboard
- map <F10> :-1r !xclip -o -sel clip<CR> " paste text from xserv clip to vim
- map <CR> o<Esc> " newline with Enter (command-mode)
- noremap <C-J> gj " wrapped line navigation
- noremap <C-K> gk
- " space bar un-highligts search
- :noremap <silent> <Space> :silent noh<Bar>echo<CR>
Advertisement
Add Comment
Please, Sign In to add comment