Update
This commit is contained in:
parent
ede0506b4d
commit
25d274e48c
2 changed files with 52 additions and 6 deletions
|
|
@ -47,7 +47,6 @@ set history=10000
|
||||||
set foldmethod=indent
|
set foldmethod=indent
|
||||||
set foldlevel=99
|
set foldlevel=99
|
||||||
let g:pydiction_location='/home/joey/.vim/bundle/pydiction/complete-dict'
|
let g:pydiction_location='/home/joey/.vim/bundle/pydiction/complete-dict'
|
||||||
let g:python_version_2 = 1
|
|
||||||
let g:jsx_ext_required = 0
|
let g:jsx_ext_required = 0
|
||||||
let g:asyncrun_auto = "make"
|
let g:asyncrun_auto = "make"
|
||||||
let g:syntastic_enable_elixir_checker = 1
|
let g:syntastic_enable_elixir_checker = 1
|
||||||
|
|
@ -141,7 +140,7 @@ command U :%s#\C\(\<\u[a-z0-9]\+\|[a-z0-9]\+\)\(\u\)#\l\1_\l\2#g
|
||||||
map <Leader>y "*y
|
map <Leader>y "*y
|
||||||
map <Leader>p "*p
|
map <Leader>p "*p
|
||||||
|
|
||||||
nmap =j :%!python -m json.tool<CR>
|
nmap =j :%!python3 -m json.tool<CR>
|
||||||
|
|
||||||
if !exists("autocommands_loaded")
|
if !exists("autocommands_loaded")
|
||||||
let autocommands_loaded = 1
|
let autocommands_loaded = 1
|
||||||
|
|
@ -192,6 +191,8 @@ endf
|
||||||
nn <C-g> :call JumpToDef()<cr>
|
nn <C-g> :call JumpToDef()<cr>
|
||||||
ino <C-g> <esc>:call JumpToDef()<cr>i
|
ino <C-g> <esc>:call JumpToDef()<cr>i
|
||||||
|
|
||||||
|
nn <C-m> :Rg<cr>
|
||||||
|
|
||||||
autocmd FileType ocaml nmap <C-t> :MerlinTypeOf<cr>
|
autocmd FileType ocaml nmap <C-t> :MerlinTypeOf<cr>
|
||||||
|
|
||||||
" replace currently selected text with default register
|
" replace currently selected text with default register
|
||||||
|
|
@ -447,6 +448,49 @@ let g:asyncomplete_auto_popup = 0
|
||||||
au User asyncomplete_setup call asyncomplete#register_source({
|
au User asyncomplete_setup call asyncomplete#register_source({
|
||||||
\ 'name': 'nim',
|
\ 'name': 'nim',
|
||||||
\ 'whitelist': ['nim'],
|
\ 'whitelist': ['nim'],
|
||||||
\ 'triggers': {'*': ['.'] },
|
\ 'triggers': {'nim': ['.'] },
|
||||||
\ 'completor': {opt, ctx -> nim#suggest#sug#GetAllCandidates({start, candidates -> asyncomplete#complete(opt['name'], ctx, start, candidates)})}
|
\ 'completor': {opt, ctx -> nim#suggest#sug#GetAllCandidates({start, candidates -> asyncomplete#complete(opt['name'], ctx, start, candidates)})}
|
||||||
\ })
|
\ })
|
||||||
|
|
||||||
|
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
|
||||||
|
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
|
||||||
|
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<cr>"
|
||||||
|
imap <silent> . .<Plug>(asyncomplete_force_refresh)
|
||||||
|
|
||||||
|
" let g:asyncomplete_auto_popup = 0
|
||||||
|
|
||||||
|
function! s:check_back_space() abort
|
||||||
|
let col = col('.') - 1
|
||||||
|
return !col || getline('.')[col - 1] =~ '\s'
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
inoremap <silent><expr> <TAB>
|
||||||
|
\ pumvisible() ? "\<C-n>" :
|
||||||
|
\ <SID>check_back_space() ? "\<TAB>" :
|
||||||
|
\ asyncomplete#force_refresh()
|
||||||
|
|
||||||
|
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
|
||||||
|
autocmd! CompleteDone * if pumvisible() == 0 | pclose | endif
|
||||||
|
set completeopt+=preview
|
||||||
|
set rtp+=/usr/local/opt/fzf
|
||||||
|
function! WrapForTmux(s)
|
||||||
|
if !exists('$TMUX')
|
||||||
|
return a:s
|
||||||
|
endif
|
||||||
|
|
||||||
|
let tmux_start = "\<Esc>Ptmux;"
|
||||||
|
let tmux_end = "\<Esc>\\"
|
||||||
|
|
||||||
|
return tmux_start . substitute(a:s, "\<Esc>", "\<Esc>\<Esc>", 'g') . tmux_end
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
let &t_SI .= WrapForTmux("\<Esc>[?2004h")
|
||||||
|
let &t_EI .= WrapForTmux("\<Esc>[?2004l")
|
||||||
|
|
||||||
|
function! XTermPasteBegin()
|
||||||
|
set pastetoggle=<Esc>[201~
|
||||||
|
set paste
|
||||||
|
return ""
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
inoremap <special> <expr> <Esc>[200~ XTermPasteBegin()
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,12 @@
|
||||||
|
|
||||||
# -- general -------------------------------------------------------------------
|
# -- general -------------------------------------------------------------------
|
||||||
# Add truecolor support
|
# Add truecolor support
|
||||||
set-option -ga terminal-overrides ",xterm-256color:Tc"
|
set-option -s default-terminal "tmux-256color"
|
||||||
|
set-option -sa terminal-overrides ",xterm-256color:RGB"
|
||||||
|
set-option -sa terminal-overrides ",xterm-255color*:Tc"
|
||||||
# Default terminal is 256 colors
|
# Default terminal is 256 colors
|
||||||
|
|
||||||
set -g default-terminal "screen-256color" # colors!
|
#set -g default-terminal "screen-256color" # colors!
|
||||||
setw -g xterm-keys on
|
setw -g xterm-keys on
|
||||||
set -s escape-time 10 # faster command sequences
|
set -s escape-time 10 # faster command sequences
|
||||||
set -sg repeat-time 600 # increase repeat timeout
|
set -sg repeat-time 600 # increase repeat timeout
|
||||||
|
|
@ -182,7 +184,7 @@ bind-key -n C-h if-shell "$is_vim" "send-keys C-h" "select-pane -L"
|
||||||
bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
|
bind-key -n C-j if-shell "$is_vim" "send-keys C-j" "select-pane -D"
|
||||||
bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
|
bind-key -n C-k if-shell "$is_vim" "send-keys C-k" "select-pane -U"
|
||||||
bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
|
bind-key -n C-l if-shell "$is_vim" "send-keys C-l" "select-pane -R"
|
||||||
bind-key -n 'C-\' if-shell "$is_vim" "send-keys C-\\" "select-pane -l"
|
bind-key -n 'C-\' if-shell "$is_vim" "send-keys 'C-\\'" "select-pane -l"
|
||||||
bind-key -T copy-mode-vi C-h select-pane -L
|
bind-key -T copy-mode-vi C-h select-pane -L
|
||||||
bind-key -T copy-mode-vi C-j select-pane -D
|
bind-key -T copy-mode-vi C-j select-pane -D
|
||||||
bind-key -T copy-mode-vi C-k select-pane -U
|
bind-key -T copy-mode-vi C-k select-pane -U
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue