Skip to content

Instantly share code, notes, and snippets.

@ryuta-ito
Created January 7, 2021 00:01
Show Gist options
  • Save ryuta-ito/be5e72f644bb917d5bdff705e3aa5a0a to your computer and use it in GitHub Desktop.
Save ryuta-ito/be5e72f644bb917d5bdff705e3aa5a0a to your computer and use it in GitHub Desktop.
if !exists("*Re()")
function! Re()
source $MYVIMRC
endfunction
command! Re call Re()
endif
if !exists("*Ed()")
function! Ed()
source $MYVIMRC
endfunction
command! Ed call Ed()
endif
if !exists("ClearMatches()")
function! ClearMatches()
for match in getmatches()
call matchdelete(match.id)
endfor
endfunction
command! ClearMatches call ClearMatches()
endif
nnoremap <S-h> gT
nnoremap <S-l> gt
nnoremap <C-n> :noh<ENTER>
nnoremap q :q
nnoremap fj :tabe<Space>
nnoremap ed :Ed<ENTER>
nnoremap . :Re<ENTER>
nnoremap <C-c> :ClearMatches<ENTER>
nnoremap sh :echo expand("%:p")<ENTER>
nnoremap ! :q!
nnoremap <S-q> :wq
inoremap " ""<Left>
inoremap '<ENTER> ''<Left>
inoremap ( ()<Left>
inoremap [ []<Left>
inoremap { {}<Left>
inoremap <<ENTER> <><Left>
inoremap <C-l> <Right>
inoremap ;l <ESC>
inoremap <C-o> <ESC>O
vnoremap ;l <ESC>
set runtimepath^=~/.cache/dein/dein.vim/
set softtabstop=2
set shiftwidth=2
set laststatus=0
set clipboard+=unnamed
set backspace=indent,eol,start
set guicursor=
set tabstop=2
set autoindent
" set nowrapscan
set expandtab
set noshowcmd
set noruler
set number
set wildignorecase
set wildmode=list,full
hi Comment ctermfg=cyan
hi Error ctermfg=white ctermbg=237
filetype plugin indent on
if dein#load_state('~/.cache/dein')
call dein#begin('~/.cache/dein')
call dein#load_toml('~/.config/nvim/dein.toml')
call dein#end()
call dein#save_state()
endif
call map(dein#check_clean(), "delete(v:val, 'rf')")
map p <Plug>(miniyank-autoput)
map P <Plug>(miniyank-autoPut)
if dein#check_install()
call dein#install()
endif
syntax enable
augroup vimrcEx
au BufRead * if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "normal g`\"" | endif
augroup END
autocmd BufRead *.java setlocal tabstop=4 softtabstop=4 shiftwidth=4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment