mirror of
https://github.com/chylex/dotfiles.git
synced 2026-02-14 15:06:13 +01:00
Compare commits
33 Commits
713fb10dab
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
87894a11b5
|
|||
|
d476fb1e73
|
|||
|
f5c5ce694c
|
|||
|
a2d3fc277d
|
|||
|
ca62ab26f8
|
|||
|
31f48f8934
|
|||
|
fccc21fd41
|
|||
|
b7c2d47407
|
|||
|
c17b6235ac
|
|||
|
c9c8216e64
|
|||
|
21904bbb62
|
|||
|
d76b82721d
|
|||
|
580a47aa9b
|
|||
|
946f464aca
|
|||
|
1e5c7a752e
|
|||
|
c1fac762be
|
|||
|
8cd0b37833
|
|||
|
5cbaf5587d
|
|||
|
7b5bbf7bb7
|
|||
|
6d1840a48c
|
|||
|
4a77b0588b
|
|||
|
a9bfe13277
|
|||
|
be2bdafe78
|
|||
|
cda970bfc2
|
|||
|
80e5b074c9
|
|||
|
60cb335c9a
|
|||
|
78866848be
|
|||
|
f69bb44bfa
|
|||
|
6c4c99a98d
|
|||
|
0023b10571
|
|||
|
4fa0da63e8
|
|||
|
eb54e7d636
|
|||
|
2a8dbc57ec
|
7
.bashrc
7
.bashrc
@@ -1,8 +1,14 @@
|
|||||||
|
if [[ $- = *i* ]]; then
|
||||||
bind "set completion-ignore-case on"
|
bind "set completion-ignore-case on"
|
||||||
bind "set show-all-if-ambiguous on"
|
bind "set show-all-if-ambiguous on"
|
||||||
|
|
||||||
bind '"\e[A": history-search-backward'
|
bind '"\e[A": history-search-backward'
|
||||||
bind '"\e[B": history-search-forward'
|
bind '"\e[B": history-search-forward'
|
||||||
|
fi
|
||||||
|
|
||||||
|
shopt -s histappend
|
||||||
|
HISTCONTROL=ignoreboth
|
||||||
|
PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
|
||||||
|
|
||||||
alias gh='history|grep'
|
alias gh='history|grep'
|
||||||
alias less='less -R --mouse'
|
alias less='less -R --mouse'
|
||||||
@@ -34,6 +40,7 @@ function ssh() {
|
|||||||
tmux rename-window -t"${TMUX_PANE}" "$*"
|
tmux rename-window -t"${TMUX_PANE}" "$*"
|
||||||
command ssh "$@"
|
command ssh "$@"
|
||||||
tmux set-window-option automatic-rename "on"
|
tmux set-window-option automatic-rename "on"
|
||||||
|
vim +q # Fix terminal
|
||||||
else
|
else
|
||||||
command ssh "$@"
|
command ssh "$@"
|
||||||
fi
|
fi
|
||||||
|
|||||||
92
.ideavimrc
92
.ideavimrc
@@ -47,12 +47,22 @@ sethandler <C-Y> a:ide
|
|||||||
sethandler <C-\> a:ide
|
sethandler <C-\> a:ide
|
||||||
|
|
||||||
sethandler <A-B> a:vim
|
sethandler <A-B> a:vim
|
||||||
|
sethandler <A-E> a:vim
|
||||||
sethandler <A-H> a:vim
|
sethandler <A-H> a:vim
|
||||||
|
sethandler <A-J> a:vim
|
||||||
|
sethandler <A-K> a:vim
|
||||||
sethandler <A-L> a:vim
|
sethandler <A-L> a:vim
|
||||||
|
sethandler <A-M> a:vim
|
||||||
sethandler <A-N> a:vim
|
sethandler <A-N> a:vim
|
||||||
sethandler <A-O> a:vim
|
sethandler <A-O> a:vim
|
||||||
sethandler <A-P> a:vim
|
sethandler <A-P> a:vim
|
||||||
sethandler <A-S-B> a:vim
|
sethandler <A-S-B> a:vim
|
||||||
|
sethandler <A-S-E> a:vim
|
||||||
|
sethandler <A-S-H> a:vim
|
||||||
|
sethandler <A-S-J> a:vim
|
||||||
|
sethandler <A-S-K> a:vim
|
||||||
|
sethandler <A-S-L> a:vim
|
||||||
|
sethandler <A-S-M> a:vim
|
||||||
sethandler <A-S-O> a:vim
|
sethandler <A-S-O> a:vim
|
||||||
sethandler <A-V> a:vim
|
sethandler <A-V> a:vim
|
||||||
sethandler <A-X> a:vim
|
sethandler <A-X> a:vim
|
||||||
@@ -65,6 +75,17 @@ sethandler <C-S-W> a:vim
|
|||||||
sethandler <C-U> a:vim
|
sethandler <C-U> a:vim
|
||||||
sethandler <S-BS> a:vim
|
sethandler <S-BS> a:vim
|
||||||
|
|
||||||
|
sethandler <C-Left> a:vim
|
||||||
|
sethandler <C-Right> a:vim
|
||||||
|
sethandler <S-Left> a:vim
|
||||||
|
sethandler <S-Right> a:vim
|
||||||
|
|
||||||
|
if &ide =~? 'rider'
|
||||||
|
" These shortcuts are broken in Rider for some reason...
|
||||||
|
sethandler <A-S-H> a:ide
|
||||||
|
sethandler <A-S-L> a:ide
|
||||||
|
endif
|
||||||
|
|
||||||
" Enable plugins (https://github.com/JetBrains/ideavim/wiki/IdeaVim-Plugins)
|
" Enable plugins (https://github.com/JetBrains/ideavim/wiki/IdeaVim-Plugins)
|
||||||
Plug 'argtextobj.vim'
|
Plug 'argtextobj.vim'
|
||||||
Plug 'vim-exchange'
|
Plug 'vim-exchange'
|
||||||
@@ -91,24 +112,35 @@ map í 9
|
|||||||
map é 0
|
map é 0
|
||||||
|
|
||||||
" Move some commands closer on Czech keyboard layout
|
" Move some commands closer on Czech keyboard layout
|
||||||
nnoremap ú @@
|
|
||||||
noremap § ;
|
|
||||||
map ů %
|
map ů %
|
||||||
map gů g%
|
nnoremap ú @@
|
||||||
|
noremap , +
|
||||||
|
|
||||||
" Camel humps
|
noremap § `
|
||||||
|
noremap §§ ``
|
||||||
|
nnoremap m§ m
|
||||||
|
|
||||||
|
sunmap ů
|
||||||
|
sunmap §
|
||||||
|
|
||||||
|
" Enter visual block mode
|
||||||
|
map <A-v> <C-v>
|
||||||
|
|
||||||
|
" Navigate camel humps
|
||||||
noremap L [w
|
noremap L [w
|
||||||
noremap H [b
|
noremap H [b
|
||||||
nnoremap L [w
|
nnoremap L [w
|
||||||
nnoremap H [b
|
nnoremap H [b
|
||||||
|
|
||||||
" Navigate to end of previous word
|
" Navigate to end of previous word
|
||||||
noremap <A-b> ge
|
noremap <A-e> ge
|
||||||
noremap <A-S-b> gE
|
noremap <A-S-e> gE
|
||||||
|
|
||||||
" Increment/decrement numbers
|
" Navigate unmatched parentheses/braces
|
||||||
noremap <Bar>+ <C-a>
|
noremap g( [(
|
||||||
noremap <Bar>- <C-x>
|
noremap g) ])
|
||||||
|
noremap g{ [{
|
||||||
|
noremap g} ]}
|
||||||
|
|
||||||
" Edit from cursor to start/end of parenthesized block
|
" Edit from cursor to start/end of parenthesized block
|
||||||
nnoremap c) c])
|
nnoremap c) c])
|
||||||
@@ -117,23 +149,27 @@ nnoremap c( c[((
|
|||||||
nnoremap d( c[((<Esc>l
|
nnoremap d( c[((<Esc>l
|
||||||
|
|
||||||
" Create lines
|
" Create lines
|
||||||
nnoremap <A-o> o<Esc>$
|
nnoremap go o<Esc>$
|
||||||
nnoremap <A-S-o> O<Esc>$
|
nnoremap gO O<Esc>$
|
||||||
|
nnoremap g<CR> i<CR><Esc>l
|
||||||
|
|
||||||
" Delete lines
|
" Edit current line
|
||||||
nnoremap C cc
|
nnoremap C cc
|
||||||
xnoremap C cc
|
xnoremap C cc
|
||||||
nnoremap D dd
|
nnoremap D dd
|
||||||
xnoremap D dd
|
xnoremap D dd
|
||||||
|
nnoremap < <<
|
||||||
" Enter visual block mode
|
nnoremap > >>
|
||||||
map <A-v> <C-v>
|
|
||||||
|
|
||||||
" Indent keeping selection
|
" Indent keeping selection
|
||||||
xnoremap < <gv
|
xnoremap < <gv
|
||||||
xnoremap > >gv
|
xnoremap > >gv
|
||||||
xnoremap = =gv
|
xnoremap = =gv
|
||||||
|
|
||||||
|
" Extend selection
|
||||||
|
map <A-m> <Action>(EditorSelectWord)
|
||||||
|
map <A-S-m> <Action>(EditorUnSelectWord)
|
||||||
|
|
||||||
" Turn capital letters into opposite actions
|
" Turn capital letters into opposite actions
|
||||||
" nnoremap U :redo<CR> " Handled by custom version of IdeaVIM
|
" nnoremap U :redo<CR> " Handled by custom version of IdeaVIM
|
||||||
|
|
||||||
@@ -147,6 +183,11 @@ xnoremap P p
|
|||||||
" Clear search highlights
|
" Clear search highlights
|
||||||
nnoremap <Esc> :nohlsearch<Return><Esc>
|
nnoremap <Esc> :nohlsearch<Return><Esc>
|
||||||
|
|
||||||
|
" Code completion
|
||||||
|
if &ide !~? 'rider'
|
||||||
|
imap <expr> ! pumvisible() ? '<Action>(EditorChooseLookupItem)<Esc>mzF.bi!<Esc>`zla' : '!'
|
||||||
|
endif
|
||||||
|
|
||||||
" Show parameter info
|
" Show parameter info
|
||||||
nmap <A-p> <Action>(ParameterInfo)
|
nmap <A-p> <Action>(ParameterInfo)
|
||||||
imap <A-p> <Action>(ParameterInfo)
|
imap <A-p> <Action>(ParameterInfo)
|
||||||
@@ -167,12 +208,29 @@ map ] <Action>(MethodDown)
|
|||||||
map { <Plug>(ParagraphPrevMotion)$
|
map { <Plug>(ParagraphPrevMotion)$
|
||||||
map } <Plug>(ParagraphNextMotion)$
|
map } <Plug>(ParagraphNextMotion)$
|
||||||
|
|
||||||
|
" Move statement/element
|
||||||
|
map <A-S-h> <Action>(MoveElementLeft)
|
||||||
|
map <A-S-l> <Action>(MoveElementRight)
|
||||||
|
|
||||||
|
map <A-S-j> <Action>(MoveStatementDown)
|
||||||
|
map <A-S-k> <Action>(MoveStatementUp)
|
||||||
|
|
||||||
|
" Multiple carets
|
||||||
|
map <expr> <A-j> pumvisible() ? '<Action>(EditorDown)' : '<Action>(EditorCloneCaretBelow)'
|
||||||
|
map <expr> <A-k> pumvisible() ? '<Action>(EditorUp)' : '<Action>(EditorCloneCaretAbove)'
|
||||||
|
|
||||||
|
imap <expr> <A-j> pumvisible() ? '<Action>(EditorDown)' : '<Action>(EditorCloneCaretBelow)'
|
||||||
|
imap <expr> <A-k> pumvisible() ? '<Action>(EditorUp)' : '<Action>(EditorCloneCaretAbove)'
|
||||||
|
|
||||||
|
xmap gl <Action>(EditorAddCaretPerSelectedLine)
|
||||||
|
|
||||||
" Manage editor tabs
|
" Manage editor tabs
|
||||||
map <C-w>m <Action>(MoveEditorToOppositeTabGroup)
|
map <C-w>m <Action>(MoveEditorToOppositeTabGroup)
|
||||||
map <C-w>s <Action>(MoveTabDown)
|
map <C-w>s <Action>(MoveTabDown)
|
||||||
map <C-w>u <Action>(Unsplit)
|
map <C-w>u <Action>(Unsplit)
|
||||||
map <C-w>U <Action>(UnsplitAll)
|
map <C-w>U <Action>(UnsplitAll)
|
||||||
map <C-w>v <Action>(MoveTabRight)
|
map <C-w>v <Action>(MoveTabRight)
|
||||||
|
map <C-w>p <Action>(PinActiveEditorTab)
|
||||||
|
|
||||||
noremap <C-w>S <C-w>s
|
noremap <C-w>S <C-w>s
|
||||||
noremap <C-w>V <C-w>v
|
noremap <C-w>V <C-w>v
|
||||||
@@ -203,8 +261,6 @@ map ge <Action>(VcsShowNextChangeMarker)
|
|||||||
map gE <Action>(VcsShowPrevChangeMarker)
|
map gE <Action>(VcsShowPrevChangeMarker)
|
||||||
map gf <Action>(VimJumpToSource)<Action>(HideActiveWindow)
|
map gf <Action>(VimJumpToSource)<Action>(HideActiveWindow)
|
||||||
map gi <Action>(GotoImplementation)
|
map gi <Action>(GotoImplementation)
|
||||||
map gj <Action>(EditorCloneCaretBelow)
|
|
||||||
map gk <Action>(EditorCloneCaretAbove)
|
|
||||||
map gr <Action>(RecentLocations)
|
map gr <Action>(RecentLocations)
|
||||||
map gR <Action>(RecentChangedFiles)
|
map gR <Action>(RecentChangedFiles)
|
||||||
map gs <Action>(GotoSuperMethod)
|
map gs <Action>(GotoSuperMethod)
|
||||||
@@ -213,8 +269,6 @@ map gt gg<Action>(KM.GotoNextTypeInFile)
|
|||||||
map gT <Action>(KM.GotoNextTypeInFile)
|
map gT <Action>(KM.GotoNextTypeInFile)
|
||||||
map gu <Action>(ShowUsages)
|
map gu <Action>(ShowUsages)
|
||||||
map gU <Action>(FindUsages)
|
map gU <Action>(FindUsages)
|
||||||
map g( <Action>(KM.GotoPreviousErrorInOtherMode)
|
|
||||||
map g) <Action>(KM.GotoNextErrorInOtherMode)
|
|
||||||
|
|
||||||
" Repurpose 'z' for view actions and debugger
|
" Repurpose 'z' for view actions and debugger
|
||||||
map za <Action>(Annotate)
|
map za <Action>(Annotate)
|
||||||
|
|||||||
114
.vimrc
114
.vimrc
@@ -1,5 +1,9 @@
|
|||||||
set autoindent
|
set autoindent
|
||||||
|
set backspace=indent,eol,start
|
||||||
|
set completeopt=menuone,preview
|
||||||
set encoding=utf-8
|
set encoding=utf-8
|
||||||
|
set guifont=Cascadia_Mono:h12:cANSI:qDRAFT
|
||||||
|
set guioptions-=t " Remove menu tearoff
|
||||||
set history=1024
|
set history=1024
|
||||||
set hlsearch
|
set hlsearch
|
||||||
set ignorecase
|
set ignorecase
|
||||||
@@ -7,19 +11,23 @@ set incsearch
|
|||||||
set infercase
|
set infercase
|
||||||
set laststatus=2
|
set laststatus=2
|
||||||
set linebreak
|
set linebreak
|
||||||
set listchars=space:·,tab:>·,trail:~,extends:>,precedes:<
|
set list
|
||||||
|
set listchars=lead:·,trail:·,tab:→\ ,extends:>,precedes:<
|
||||||
set modeline
|
set modeline
|
||||||
set modelines=2
|
set modelines=2
|
||||||
set mouse=a
|
set mouse=a
|
||||||
set noerrorbells
|
set noerrorbells
|
||||||
|
set nojoinspaces
|
||||||
set noshowcmd
|
set noshowcmd
|
||||||
set noshowmode
|
set noshowmode
|
||||||
set number
|
|
||||||
set nrformats-=octal
|
set nrformats-=octal
|
||||||
|
set number
|
||||||
set relativenumber
|
set relativenumber
|
||||||
set scrolloff=999
|
set scrolloff=999
|
||||||
set shiftwidth=0
|
set shiftwidth=0
|
||||||
set showbreak=↪
|
set shortmess-=S " Show search count
|
||||||
|
set shortmess-=l " Show full description for lines and bytes
|
||||||
|
set showbreak=↪\
|
||||||
set showmatch
|
set showmatch
|
||||||
set sidescrolloff=999
|
set sidescrolloff=999
|
||||||
set smartcase
|
set smartcase
|
||||||
@@ -27,22 +35,44 @@ set tabstop=4
|
|||||||
set ttimeout
|
set ttimeout
|
||||||
set ttimeoutlen=50
|
set ttimeoutlen=50
|
||||||
set ttymouse=xterm2
|
set ttymouse=xterm2
|
||||||
|
set virtualedit=onemore
|
||||||
set wildmenu
|
set wildmenu
|
||||||
|
set winaltkeys=no
|
||||||
set wrap
|
set wrap
|
||||||
|
|
||||||
" Show full description for lines and bytes
|
if has("patch-9.1.0463")
|
||||||
set shortmess-=l
|
set completeopt+=fuzzy
|
||||||
|
endif
|
||||||
|
|
||||||
" Show search count
|
" Windows paths
|
||||||
set shortmess-=S
|
set packpath=$HOME/.vim,$VIM/vimfiles,$VIMRUNTIME
|
||||||
|
set runtimepath=$HOME/.vim,$VIM/vimfiles,$VIMRUNTIME
|
||||||
|
|
||||||
" Color scheme
|
" Color scheme
|
||||||
syntax enable
|
syntax enable
|
||||||
|
|
||||||
|
if has("gui_running")
|
||||||
|
colorscheme retrobox
|
||||||
|
highlight NonText ctermfg=14 guifg=#7c6f64
|
||||||
|
else
|
||||||
colorscheme custom
|
colorscheme custom
|
||||||
highlight LineNr ctermfg=244
|
highlight LineNr ctermfg=244
|
||||||
highlight IncSearch ctermfg=251 ctermbg=238
|
highlight IncSearch ctermfg=251 ctermbg=238
|
||||||
highlight Search ctermfg=251 ctermbg=238
|
highlight Search ctermfg=251 ctermbg=238
|
||||||
highlight Visual ctermfg=240 ctermbg=250
|
highlight Visual ctermfg=240 ctermbg=250
|
||||||
|
endif
|
||||||
|
|
||||||
|
highlight SpecialKey ctermfg=8 guifg=#584f46
|
||||||
|
|
||||||
|
" Windows GUI
|
||||||
|
if has("win32") && has("gui_running")
|
||||||
|
autocmd GUIEnter * simalt ~x " Maximize window
|
||||||
|
autocmd GUIEnter * set visualbell t_vb= " Disable bell sound
|
||||||
|
|
||||||
|
set listchars+=tab:▶\
|
||||||
|
set renderoptions=type:directx " Fix unicode rendering
|
||||||
|
set showbreak=→\
|
||||||
|
endif
|
||||||
|
|
||||||
" Fix Alt mappings (https://github.com/vim/vim/issues/2588#issuecomment-697959290)
|
" Fix Alt mappings (https://github.com/vim/vim/issues/2588#issuecomment-697959290)
|
||||||
for ord in range(65, 90) + range(97, 122)
|
for ord in range(65, 90) + range(97, 122)
|
||||||
@@ -68,13 +98,21 @@ map í 9
|
|||||||
map é 0
|
map é 0
|
||||||
|
|
||||||
" Move some commands closer on Czech keyboard layout
|
" Move some commands closer on Czech keyboard layout
|
||||||
nnoremap ú @@
|
|
||||||
noremap § ;
|
|
||||||
map ů %
|
map ů %
|
||||||
map gů g%
|
nnoremap ú @@
|
||||||
sunmap ů
|
noremap , +
|
||||||
|
|
||||||
" Camel humps (https://github.com/vim-scripts/camelcasemotion)
|
noremap § `
|
||||||
|
noremap §§ ``
|
||||||
|
nnoremap m§ m
|
||||||
|
|
||||||
|
sunmap ů
|
||||||
|
sunmap §
|
||||||
|
|
||||||
|
" Enter visual block mode
|
||||||
|
noremap <M-v> <C-v>
|
||||||
|
|
||||||
|
" Navigate camel humps (https://github.com/vim-scripts/camelcasemotion)
|
||||||
map L <Plug>CamelCaseMotion_w
|
map L <Plug>CamelCaseMotion_w
|
||||||
map H <Plug>CamelCaseMotion_b
|
map H <Plug>CamelCaseMotion_b
|
||||||
sunmap L
|
sunmap L
|
||||||
@@ -86,8 +124,8 @@ omap iH <Plug>CamelCaseMotion_ib
|
|||||||
xmap iH <Plug>CamelCaseMotion_ib
|
xmap iH <Plug>CamelCaseMotion_ib
|
||||||
|
|
||||||
" Navigate to end of previous word
|
" Navigate to end of previous word
|
||||||
noremap <M-b> ge
|
noremap <M-e> ge
|
||||||
noremap <M-S-b> gE
|
noremap <M-S-e> gE
|
||||||
|
|
||||||
" Navigate soft-wrapped lines
|
" Navigate soft-wrapped lines
|
||||||
nnoremap <expr> j v:count ? 'j' : 'gj'
|
nnoremap <expr> j v:count ? 'j' : 'gj'
|
||||||
@@ -95,6 +133,17 @@ xnoremap <expr> j v:count ? 'j' : 'gj'
|
|||||||
nnoremap <expr> k v:count ? 'k' : 'gk'
|
nnoremap <expr> k v:count ? 'k' : 'gk'
|
||||||
xnoremap <expr> k v:count ? 'k' : 'gk'
|
xnoremap <expr> k v:count ? 'k' : 'gk'
|
||||||
|
|
||||||
|
nnoremap gj j
|
||||||
|
xnoremap gj j
|
||||||
|
nnoremap gk k
|
||||||
|
xnoremap gk k
|
||||||
|
|
||||||
|
" Navigate unmatched parentheses/braces
|
||||||
|
noremap g( [(
|
||||||
|
noremap g) ])
|
||||||
|
noremap g{ [{
|
||||||
|
noremap g} ]}
|
||||||
|
|
||||||
" Edit from cursor to start/end of parenthesized block
|
" Edit from cursor to start/end of parenthesized block
|
||||||
nnoremap c) c])
|
nnoremap c) c])
|
||||||
nnoremap d) d])
|
nnoremap d) d])
|
||||||
@@ -102,17 +151,17 @@ nnoremap c( c[((
|
|||||||
nnoremap d( c[((<Esc>l
|
nnoremap d( c[((<Esc>l
|
||||||
|
|
||||||
" Create lines
|
" Create lines
|
||||||
nnoremap <M-o> o<Esc>$
|
nnoremap go o<Esc>$
|
||||||
nnoremap <M-S-o> O<Esc>$ " TODO does not leave insert mode properly?
|
nnoremap gO O<Esc>$
|
||||||
|
nnoremap g<CR> i<CR><Esc>l
|
||||||
|
|
||||||
" Delete lines
|
" Edit current line
|
||||||
nnoremap C cc
|
nnoremap C cc
|
||||||
xnoremap C cc
|
xnoremap C cc
|
||||||
nnoremap D dd
|
nnoremap D dd
|
||||||
xnoremap D dd
|
xnoremap D dd
|
||||||
|
nnoremap < <<
|
||||||
" Enter visual block mode
|
nnoremap > >>
|
||||||
map <M-v> <C-v>
|
|
||||||
|
|
||||||
" Indent keeping selection
|
" Indent keeping selection
|
||||||
xnoremap < <gv
|
xnoremap < <gv
|
||||||
@@ -132,6 +181,31 @@ xnoremap P p
|
|||||||
" Clear search highlights
|
" Clear search highlights
|
||||||
nnoremap <Esc> :nohlsearch<Return><Esc>
|
nnoremap <Esc> :nohlsearch<Return><Esc>
|
||||||
|
|
||||||
|
" Prevent deleting whitespace on empty lines when exiting Normal mode
|
||||||
|
inoremap <silent> <Esc> <C-O>:stopinsert<CR>
|
||||||
|
|
||||||
|
" Completion
|
||||||
|
inoremap <C-Space> <C-n>
|
||||||
|
inoremap <expr> j pumvisible() ? '<C-n>' : 'j'
|
||||||
|
inoremap <expr> k pumvisible() ? '<C-p>' : 'k'
|
||||||
|
inoremap <expr> <Esc> pumvisible() ? '<C-e>' : '<Esc>'
|
||||||
|
inoremap <expr> <Enter> pumvisible() ? '<C-y>' : '<Enter>'
|
||||||
|
|
||||||
|
" Use Ctrl for selection and clipboard
|
||||||
|
nnoremap <C-a> ggVG
|
||||||
|
xnoremap <C-a> ggoG
|
||||||
|
|
||||||
|
xnoremap <C-c> "+y
|
||||||
|
xnoremap <C-x> "+x
|
||||||
|
|
||||||
|
noremap <C-v> "+gP
|
||||||
|
inoremap <C-v> <C-o>:set paste<CR><C-r>+<C-o>:set nopaste<CR>
|
||||||
|
cnoremap <C-v> <C-r>+
|
||||||
|
|
||||||
|
nnoremap <C-s> :w<CR>
|
||||||
|
xnoremap <C-s> :<C-U>w<CR>gv
|
||||||
|
inoremap <C-s> <C-o>:w<CR>
|
||||||
|
|
||||||
" Update search register when using f/t
|
" Update search register when using f/t
|
||||||
function FindChar(action, reverse, search_affix)
|
function FindChar(action, reverse, search_affix)
|
||||||
let t:reverse_search = a:reverse
|
let t:reverse_search = a:reverse
|
||||||
|
|||||||
Reference in New Issue
Block a user