Skip to content

Instantly share code, notes, and snippets.

@syui
Created June 2, 2015 20:51
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 syui/b7876bc902249db8afc2 to your computer and use it in GitHub Desktop.
Save syui/b7876bc902249db8afc2 to your computer and use it in GitHub Desktop.
syntax enable
set number
set ruler
set list
set listchars=tab:>-,trail:-,nbsp:%,extends:>,precedes:<,eol:<
set incsearch
set hlsearch
set nowrap
set showmatch
set whichwrap=h,l
set nowrapscan
set ignorecase
set smartcase
set hidden
set history=2000
set autoindent
set expandtab
set tabstop=2
set shiftwidth=2
set helplang=en
set nobackup
set noswapfile
set noundofile
if has('gui_running')
set lines=999
set columns=120
set guioptions-=m
set guioptions-=T
set guioptions-=r
set guioptions-=R
set guioptions-=l
set guioptions-=L
endif
colorscheme desert
nnoremap <Space>w :<C-u>w<CR>
nnoremap <Space>q :<C-u>q<CR>
nnoremap <Space>Q :<C-u>q!<CR>
"nnoremap ; :
"nnoremap : ;
"vnoremap ; :
"vnoremap : ;
nnoremap <Space>h ^
vnoremap <Space>h ^
nnoremap <Space>l $
vnoremap <Space>l $
nnoremap k gk
nnoremap j gj
vnoremap k gk
vnoremap j gj
nnoremap gk k
nnoremap gj j
vnoremap gk k
vnoremap gj j
nnoremap <Space>/ *<C-o>
nnoremap g<Space>/ g*<C-o>
nnoremap <expr> n <SID>search_forward_p() ? 'nzv' : 'Nzv'
nnoremap <expr> N <SID>search_forward_p() ? 'Nzv' : 'nzv'
vnoremap <expr> n <SID>search_forward_p() ? 'nzv' : 'Nzv'
vnoremap <expr> N <SID>search_forward_p() ? 'Nzv' : 'nzv'
function! s:search_forward_p()
return exists('v:searchforward') ? v:searchforward : 1
endfunction
nnoremap <Space>o :<C-u>for i in range(v:count1) \| call append(line('.'), '') \| endfor<CR>
nnoremap <Space>O :<C-u>for i in range(v:count1) \| call append(line('.')-1, '') \| endfor<CR>
nnoremap <silent> tt :<C-u>tabe<CR>
nnoremap <C-p> gT
nnoremap <C-n> gt
nnoremap <silent> <Esc><Esc> :<C-u>nohlsearch<CR>
nnoremap ZZ <Nop>
nnoremap ZQ <Nop>
nnoremap Q gq
onoremap aa a>
onoremap ia i>
onoremap ar a]
onoremap ir i]
onoremap ad a"
onoremap id i"
inoremap jk <Esc>
nnoremap gs :<C-u>%s///g<Left><Left><Left>
vnoremap gs :s///g<Left><Left><Left>
cnoremap <C-f> <Right>
cnoremap <C-b> <Left>
cnoremap <C-a> <C-b>
cnoremap <C-e> <C-e>
cnoremap <C-u> <C-e><C-u>
cnoremap <C-v> <C-f>a
"" Origin
filetype plugin on
set clipboard=unnamedplus
set ambiwidth=double
set cmdheight=1
set laststatus=2
set wildmenu
setl fo-=t fo+=croql
setl ofu=syntaxcomplete#Complete
setl ofu=pythoncomplete#Complete
setl ofu=javascriptcomplete#CompleteJS
setl ofu=htmlcomplete#CompleteTags
setl ofu=csscomplete#CompleteCSS
setl ofu=phpcomplete#CompletePHP
setl ofu=xmlcomplete#CompleteTags
setl ofu=ccomplete#Complete
setl ofu=rubyomplete#Complete
setl ofu=go#complete#Complete
setl completeopt=longest,menuone
imap jj <ESC>
nmap Y y$
nmap y9 y$
nmap y0 y^
nmap vy vawy
nmap gb '[
nmap gp ']
nmap ye ;let @"=expand("<cword>")<CR>
nmap g<C-a> diw"=<C-r>"+1<CR>p
nmap g<C-x> diw"=<C-r>"-1<CR>p
nmap <silent> cy ciW<C-r>0<ESC>:let@/=@1<CR>:noh<CR>
nmap <silent> ciy ciw<C-r>0<ESC>:let@/=@1<CR>:noh<CR>
nmap <silent> co :ContinuousNumber <C-a><CR>
vmap v $h
vmap < <gv
vmap > >gv
vmap <silent> cy c<C-r>0<ESC>:let@/=@1<CR>:noh<CR>
vmap <silent> co :ContinuousNumber <C-a><CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment