Added sudo for zsh, added ;;<Space> for insert mode
This commit is contained in:
parent
1903def20d
commit
a3fd73813f
@ -269,6 +269,7 @@ source /home/stonewareslord/git/sync/zsh/theme-and-appearance.zsh
|
|||||||
source /home/stonewareslord/git/sync/zsh/completion.zsh
|
source /home/stonewareslord/git/sync/zsh/completion.zsh
|
||||||
source /home/stonewareslord/git/sync/zsh/key-bindings.zsh
|
source /home/stonewareslord/git/sync/zsh/key-bindings.zsh
|
||||||
source /home/stonewareslord/git/sync/zsh/spectrum.zsh
|
source /home/stonewareslord/git/sync/zsh/spectrum.zsh
|
||||||
|
source /home/stonewareslord/git/sync/zsh/sudo.zsh
|
||||||
|
|
||||||
#source /home/stonewareslord/git/sync/zsh/misc.zsh
|
#source /home/stonewareslord/git/sync/zsh/misc.zsh
|
||||||
#source /home/stonewareslord/git/sync/zsh/history.zsh
|
#source /home/stonewareslord/git/sync/zsh/history.zsh
|
||||||
|
@ -106,7 +106,7 @@ inoremap {} <Right>{}<Left><CR><Esc>O
|
|||||||
inoremap {% {% %}<Left><Left><Left>
|
inoremap {% {% %}<Left><Left><Left>
|
||||||
inoremap [] []<Left>
|
inoremap [] []<Left>
|
||||||
inoremap ;; <Esc>m`A;<Esc>``a
|
inoremap ;; <Esc>m`A;<Esc>``a
|
||||||
"inoremap ;;<Space> <Esc>A;<Esc>o
|
inoremap ;;<Space> <Esc>A;<Esc>o
|
||||||
"nnoremap ;; m"A;<Esc>`"
|
"nnoremap ;; m"A;<Esc>`"
|
||||||
"nnoremap ;;<Space> A;<Esc>o
|
"nnoremap ;;<Space> A;<Esc>o
|
||||||
inoremap <C-l> <Right>
|
inoremap <C-l> <Right>
|
||||||
@ -331,6 +331,8 @@ Plug 'vim-scripts/DirDiff.vim'
|
|||||||
"Directory diff | https://github.com/vim-scripts/DirDiff.vim
|
"Directory diff | https://github.com/vim-scripts/DirDiff.vim
|
||||||
Plug 'vim-scripts/DoxygenToolkit.vim'
|
Plug 'vim-scripts/DoxygenToolkit.vim'
|
||||||
"Doxygen | https://github.com/vim-scripts/DoxygenToolkit.vim
|
"Doxygen | https://github.com/vim-scripts/DoxygenToolkit.vim
|
||||||
|
Plug 'vim-scripts/SyntaxRange'
|
||||||
|
"Range of syntaxes | https://github.com/vim-scripts/SyntaxRange
|
||||||
"DO NOT DELETE LINE ABOVE OR \bun WILL BREAK
|
"DO NOT DELETE LINE ABOVE OR \bun WILL BREAK
|
||||||
call plug#end()
|
call plug#end()
|
||||||
filetype plugin indent on
|
filetype plugin indent on
|
||||||
|
21
zsh/sudo.zsh
Normal file
21
zsh/sudo.zsh
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# Description
|
||||||
|
# -----------
|
||||||
|
#
|
||||||
|
# sudo will be inserted before the command
|
||||||
|
#
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
# Authors
|
||||||
|
# -------
|
||||||
|
#
|
||||||
|
# * Dongweiming <ciici123@gmail.com>
|
||||||
|
#
|
||||||
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
sudo-command-line() {
|
||||||
|
[[ -z $BUFFER ]] && zle up-history
|
||||||
|
[[ $BUFFER != sudo\ * ]] && LBUFFER="sudo $LBUFFER"
|
||||||
|
}
|
||||||
|
zle -N sudo-command-line
|
||||||
|
# Defined shortcut keys: [Esc] [Esc]
|
||||||
|
bindkey "\e\e" sudo-command-line
|
Loading…
Reference in New Issue
Block a user