Skip to content

Instantly share code, notes, and snippets.

@clicube
Created July 9, 2012 04:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save clicube/3074169 to your computer and use it in GitHub Desktop.
Save clicube/3074169 to your computer and use it in GitHub Desktop.
" http://vimwiki.net/?OptionList
"----------------
" ui, color
"----------------
syntax on
set background=dark
"colorscheme desert
"colorscheme molokai
"colorscheme jellybeans
colorscheme solarized
set number
set cursorline
set wildmenu
set nowrap
set ruler
set nocompatible
set title
set showcmd
"set laststatus=2
"set whichwrap=b,s,h,l,>,>,[,]
set mouse=a
"----------------
" search
"----------------
set ignorecase
set smartcase
set wrapscan
set hlsearch
set incsearch
nmap <Esc><Esc> :noh<CR>
"----------------
" tab
"----------------
set ts=2
set sw=2
set sts=2
"set expandtab
autocmd FileType ruby setlocal sw=2 sts=2 ts=2 expandtab
"----------------
" edit
"----------------
set autoindent
set cindent
set smartindent
set showmatch
set backspace=indent,eol,start
set clipboard=unnamed
filetype on
filetype indent on
filetype plugin on
"----------------
" use "set paste" when pasted from clipboard
" http://ttssh2.sourceforge.jp/manual/ja/usage/tips/vim.html#Bracketed
"----------------
if &term =~ "xterm"
let &t_ti .= "\e[?2004h"
let &t_te .= "\e[?2004l"
let &pastetoggle = "\e[201~"
function XTermPasteBegin(ret)
set paste
return a:ret
endfunction
noremap <special> <expr> <Esc>[200~ XTermPasteBegin("0i")
inoremap <special> <expr> <Esc>[200~ XTermPasteBegin("")
cnoremap <special> <Esc>[200~ <nop>
cnoremap <special> <Esc>[201~ <nop>
endif
"----------------
" back a cursor when inputting ()s
" http://www.e2esound.com/wp/2010/11/07/add_vimrc_settings/
"----------------
imap {} {}<C-O>i
imap [] []<C-O>i
imap () ()<C-O>i
imap "" ""<C-O>i
imap '' ''<C-O>i
imap <> <><C-O>i
"----------------
" disable cursor keys
" http://lists.debian.or.jp/debian-users/200703/msg00095.html
"----------------
noremap <Left> <Nop>
noremap <Right> <Nop>
noremap <Up> <Nop>
noremap <Down> <Nop>
noremap! <Left> <Nop>
noremap! <Right> <Nop>
noremap! <Up> <Nop>
noremap! <Down> <Nop>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment