Skip to content

Instantly share code, notes, and snippets.

@supermomonga
Created September 3, 2018 02:23
Show Gist options
  • Save supermomonga/da0b555d67ec95ff5b8f311ed866d4bb to your computer and use it in GitHub Desktop.
Save supermomonga/da0b555d67ec95ff5b8f311ed866d4bb 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 encoding=utf8
set ambiwidth=double
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
" Font
set guifont=Cica:h18
set rop=type:directx,renmode:5
endif
colorscheme desert
nnoremap ; :
nnoremap : ;
vnoremap ; :
vnoremap : ;
nnoremap k gk
nnoremap j gj
vnoremap k gk
vnoremap j gj
nnoremap <expr>0 col('.') == 1 ? '^' : '0'
nnoremap <expr>^ col('.') == 1 ? '^' : '0'
nnoremap _ :sp<CR>
nnoremap <bar> :vsp<CR>
nnoremap <C-l> i<Space><Esc><Right>
nnoremap <C-h> i<Space><Esc>
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment