Skip to content

Instantly share code, notes, and snippets.

@puhitaku
Last active July 27, 2018 11:59
Show Gist options
  • Select an option

  • Save puhitaku/ca8086514080ef6ef3f65450fa8de276 to your computer and use it in GitHub Desktop.

Select an option

Save puhitaku/ca8086514080ef6ef3f65450fa8de276 to your computer and use it in GitHub Desktop.
set nocompatible
set number
set title
set ruler
set autoindent
set smartindent
set tabstop=4
set shiftwidth=4
set expandtab
set backspace=indent,eol,start
set mouse=a
set clipboard=unnamedplus
set noswapfile
set nobackup
syntax enable
:command Id :set autoindent | :set smartindent
:command Noid :set noautoindent | :set nosmartindent
" Split
nnoremap sp :<C-u>sp<CR>
nnoremap sv :<C-w>vs<CR>
nnoremap sj <C-w>j
nnoremap sk <C-w>k
nnoremap sl <C-w>l
nnoremap sh <C-w>h
" IME auto turnoff
set iminsert=0
set imsearch=0
set imcmdline
set imactivatefunc=ImActivate
function! ImActivate(active)
if a:active
call system('fcitx-remote -o')
else
call system('fcitx-remote -c')
endif
endfunction
set imstatusfunc=ImStatus
function! ImStatus()
return system('fcitx-remote')[0] is# '2'
endfunction
function! ImInActivate()
call system('fcitx-remote -c')
endfunction
inoremap <silent> <C-[> <ESC>:call ImInActivate()<CR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment