vim: leader + keybindings
This commit is contained in:
parent
365873fae7
commit
17fc5927f5
2 changed files with 23 additions and 21 deletions
33
.vimrc
33
.vimrc
|
@ -32,6 +32,7 @@ Plugin 'mg979/vim-visual-multi'
|
|||
Plugin 'iamcco/markdown-preview.nvim'
|
||||
call vundle#end()
|
||||
|
||||
let mapleader = ","
|
||||
|
||||
" ### allgemeine Optionen
|
||||
" ### Suche
|
||||
|
@ -89,10 +90,6 @@ if executable('rg')
|
|||
else
|
||||
let g:ctrlp_user_command = 'find %s -type f'
|
||||
endif
|
||||
" strg+f sucht fuzzy nach dateien
|
||||
nmap <C-f> :CtrlP<CR>
|
||||
" strg+l sucht fuzzy in zeilen des aktuellen buffers
|
||||
nmap <C-l> :CtrlPLine<CR>
|
||||
" ignore files
|
||||
" https://github.com/ctrlpvim/ctrlp.vim
|
||||
set wildignore+=*/tmp/*,*.so,*.swp,*.zip " MacOSX/Linux
|
||||
|
@ -105,11 +102,6 @@ let g:ctrlp_extensions = ['line', 'undo']
|
|||
" ### shellcheck
|
||||
" farbe für zeilenmarkierung im quickfix-windows
|
||||
hi QuickFixLine ctermbg=black guibg=black
|
||||
" mit , + n/p wechsele den Eintrag im Quickfix-Windows vor/zurück
|
||||
" mit , c Offne ShellCheck im QUickfix Windows
|
||||
nnoremap <Leader>n :cn<CR>
|
||||
nnoremap <Leader>p :cp<CR>
|
||||
nnoremap <Leader>c :ShellCheck!<CR>
|
||||
|
||||
" ### lightline/statusline
|
||||
" blende insert/visual/... in der commandline aus, steht in lightline
|
||||
|
@ -128,8 +120,6 @@ let g:lightline = {
|
|||
function! GitBranch()
|
||||
return system("git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n'")
|
||||
endfunction
|
||||
" ### markdown-preview
|
||||
nmap <Leader>m :MarkdownPreviewToggle<CR>
|
||||
|
||||
" ### vim startify
|
||||
" returns all modified files of the current git repo
|
||||
|
@ -159,18 +149,29 @@ let g:startify_lists = [
|
|||
|
||||
" ### Keybindings
|
||||
" deaktiviere Ex-Mode keybinding
|
||||
:nnoremap Q <Nop>
|
||||
nnoremap Q <Nop>
|
||||
" Ctrl+w zum speichern
|
||||
nmap <C-w> :q<CR>
|
||||
" Ctrl+S zum speichern
|
||||
nmap <C-s> :w<CR>
|
||||
nnoremap <C-s> :w<CR>
|
||||
" Navigate tabs
|
||||
nnoremap <C-j> :bnext<CR>
|
||||
nnoremap <C-k> :bprev<CR>
|
||||
" Saner CTRL-L
|
||||
" https://github.com/mhinz/vim-galore#saner-ctrl-l
|
||||
nnoremap <Leader>l :nohlsearch<cr>:diffupdate<cr>:syntax sync fromstart<cr><c-l>
|
||||
nnoremap <Leader>dh :nohlsearch<cr>:diffupdate<cr>:syntax sync fromstart<cr><c-l>
|
||||
" toggle linenumbers
|
||||
nmap <Leader>z :set nonu!<CR>
|
||||
nnoremap <Leader>z :set nonu!<CR>
|
||||
" toggle cursorline
|
||||
nmap <Leader>h :set nocursorline!<CR>
|
||||
nnoremap <Leader>h :set nocursorline!<CR>
|
||||
" strg+f sucht fuzzy nach dateien
|
||||
nnoremap <C-f> :CtrlP<CR>
|
||||
" strg+l sucht fuzzy in zeilen des aktuellen buffers
|
||||
nnoremap <C-l> :CtrlPLine<CR>
|
||||
" mit , + n/p wechsele den Eintrag im Quickfix-Windows vor/zurück
|
||||
" mit , c Offne ShellCheck im QUickfix Windows
|
||||
nnoremap cn :cn<CR>
|
||||
nnoremap cp :cp<CR>
|
||||
nnoremap <Leader>sc :ShellCheck!<CR>
|
||||
" ### markdown-preview
|
||||
nnoremap <Leader>m :MarkdownPreviewToggle<CR>
|
||||
|
|
11
README.md
11
README.md
|
@ -1,23 +1,24 @@
|
|||
# dotfiles
|
||||
|
||||
# vim shortcuts
|
||||
`Leader = \`
|
||||
Leader = `,`
|
||||
| Shortcut | Befehl |
|
||||
| -- | -- |
|
||||
| Leader+z | Toggle Line Numbers |
|
||||
| Leader+m |Toggle Markdown Preview |
|
||||
| Leader+p | Toggle Paste-Mode |
|
||||
| Leader+h | Toggle Cursorline |
|
||||
| Leader+c | Öffnet ShellCheck; gb öffnet die Definition auf github|
|
||||
| Leader+l | Setze Highlighting + Suche neu |
|
||||
| Ctrl+j | wechsele Buffer aufwärts |
|
||||
| Ctrl+j/k | wechsle Buffer ab/aufwärts |
|
||||
| Leader+dh | Setze Highlighting + Suche neu |
|
||||
| Leader+sc | Öffnet ShellCheck; gb öffnet die Definition auf github|
|
||||
| cn/cp | Wechsle durch Quickfix-Windows hoch/runter |
|
||||
| Ctrl+s | Speichern |
|
||||
| Ctrl+w | Schließen |
|
||||
| Ctrl+f | Fuzzy Search nach Dateien |
|
||||
| Ctrl+l | Fuzzy Search nach Zeilen in Datei |
|
||||
| Ctrl+k/l | wechsle Buffer ab/aufwärts |
|
||||
| \\\\\ | Setze mehrfachen Cursor oder Ctrl-n dann Enter pro Cursor| # 3x \
|
||||
|
||||
| * | Suche Wort unter dem Cursor |
|
||||
|
||||
# tmux shortcuts
|
||||
| Shortcut | Befehl |
|
||||
|
|
Loading…
Reference in a new issue