vim: housekeeping
Signed-off-by: Michael Grote <michael.grote@posteo.de>
This commit is contained in:
parent
31e96c6215
commit
137a8bfe19
1 changed files with 18 additions and 14 deletions
32
.vimrc
32
.vimrc
|
@ -36,16 +36,8 @@ Plugin 'mhinz/vim-startify'
|
||||||
Plugin 'ConradIrwin/vim-bracketed-paste'
|
Plugin 'ConradIrwin/vim-bracketed-paste'
|
||||||
" bessere textoperatroren
|
" bessere textoperatroren
|
||||||
Plugin 'wellle/targets.vim'
|
Plugin 'wellle/targets.vim'
|
||||||
" multi cursor; setze cursor mit \\\
|
|
||||||
Plugin 'mg979/vim-visual-multi'
|
|
||||||
" Undotree
|
" Undotree
|
||||||
Plugin 'mbbill/undotree'
|
Plugin 'mbbill/undotree'
|
||||||
" Markdown-Preview in Browser
|
|
||||||
" :source %
|
|
||||||
" :PluginInstall
|
|
||||||
" :call mkdp#util#install()
|
|
||||||
" Befehle nach Installation notwendig
|
|
||||||
Plugin 'iamcco/markdown-preview.nvim'
|
|
||||||
call vundle#end()
|
call vundle#end()
|
||||||
|
|
||||||
let mapleader = ","
|
let mapleader = ","
|
||||||
|
@ -54,18 +46,23 @@ let mapleader = ","
|
||||||
" ### Suche
|
" ### Suche
|
||||||
" While typing a search command, show immediately where the so far typed pattern matches.
|
" While typing a search command, show immediately where the so far typed pattern matches.
|
||||||
set incsearch
|
set incsearch
|
||||||
|
|
||||||
" When there is a previous search pattern, highlight all its matches.
|
" When there is a previous search pattern, highlight all its matches.
|
||||||
set hlsearch
|
set hlsearch
|
||||||
|
|
||||||
" Ignore case in search patterns.
|
" Ignore case in search patterns.
|
||||||
set ignorecase
|
set ignorecase
|
||||||
|
|
||||||
" Override the 'ignorecase' option if the search pattern contains upper case characters.
|
" Override the 'ignorecase' option if the search pattern contains upper case characters.
|
||||||
set smartcase
|
set smartcase
|
||||||
|
|
||||||
" Show line numbers.
|
" Show line numbers.
|
||||||
set number
|
set number
|
||||||
|
|
||||||
" setze cursorline
|
" setze cursorline
|
||||||
set cursorline
|
set cursorline
|
||||||
highlight CursorLine cterm=NONE ctermbg=green ctermfg=white guibg=darkred guifg=white
|
highlight CursorLine cterm=NONE ctermbg=green ctermfg=white guibg=darkred guifg=white
|
||||||
|
|
||||||
" ### Kommandovervollständigung
|
" ### Kommandovervollständigung
|
||||||
" https://www.reddit.com/r/vim/comments/oo9gms/any_way_to_get_vim_to_not_defaulting_to_the_first/h5wygix/?context=8&depth=9
|
" https://www.reddit.com/r/vim/comments/oo9gms/any_way_to_get_vim_to_not_defaulting_to_the_first/h5wygix/?context=8&depth=9
|
||||||
set wildmode=longest,list,full
|
set wildmode=longest,list,full
|
||||||
|
@ -166,45 +163,52 @@ xnoremap <F8> c``<C-r>"``<Esc>
|
||||||
" ### Keybindings
|
" ### Keybindings
|
||||||
" deaktiviere Ex-Mode keybinding
|
" deaktiviere Ex-Mode keybinding
|
||||||
nnoremap Q <Nop>
|
nnoremap Q <Nop>
|
||||||
|
|
||||||
" Ctrl+S zum speichern
|
" Ctrl+S zum speichern
|
||||||
nnoremap <C-s> :w<CR>
|
nnoremap <C-s> :w<CR>
|
||||||
|
|
||||||
" Navigate tabs
|
" Navigate tabs
|
||||||
nnoremap <C-j> :bnext<CR>
|
nnoremap <C-j> :bnext<CR>
|
||||||
nnoremap <C-k> :bprev<CR>
|
nnoremap <C-k> :bprev<CR>
|
||||||
|
|
||||||
" Saner CTRL-L
|
" Saner CTRL-L
|
||||||
" https://github.com/mhinz/vim-galore#saner-ctrl-l
|
" https://github.com/mhinz/vim-galore#saner-ctrl-l
|
||||||
nnoremap <Leader>dh :nohlsearch<cr>:diffupdate<cr>:syntax sync fromstart<cr><c-l>
|
nnoremap <Leader>dh :nohlsearch<cr>:diffupdate<cr>:syntax sync fromstart<cr><c-l>
|
||||||
|
|
||||||
" toggle cursorline
|
" toggle cursorline
|
||||||
nnoremap <Leader>h :set nocursorline!<CR>
|
nnoremap <Leader>h :set nocursorline!<CR>
|
||||||
|
|
||||||
" strg+f sucht fuzzy nach dateien
|
" strg+f sucht fuzzy nach dateien
|
||||||
nnoremap <C-f> :CtrlP<CR>
|
nnoremap <C-f> :CtrlP<CR>
|
||||||
" strg+l sucht fuzzy in Zeilen des aktuellen Buffers
|
" strg+l sucht fuzzy in Zeilen des aktuellen Buffers
|
||||||
nnoremap <C-l> :CtrlPLine<CR>
|
nnoremap <C-l> :CtrlPLine<CR>
|
||||||
|
|
||||||
" mit , + n/p wechsele den Eintrag im Quickfix-Windows vor/zurück
|
" mit , + n/p wechsele den Eintrag im Quickfix-Windows vor/zurück
|
||||||
" mit , c Öffne ShellCheck im Quickfix Windows
|
" mit , c Öffne ShellCheck im Quickfix Windows
|
||||||
nnoremap cn :cn<CR>
|
nnoremap cn :cn<CR>
|
||||||
nnoremap cp :cp<CR>
|
nnoremap cp :cp<CR>
|
||||||
nnoremap <Leader>sc :ShellCheck!<CR>
|
nnoremap <Leader>sc :ShellCheck!<CR>
|
||||||
" ### markdown-preview
|
|
||||||
nnoremap <Leader>m :MarkdownPreviewToggle<CR>
|
|
||||||
" format paragraphs as markdown table
|
" format paragraphs as markdown table
|
||||||
nnoremap <Leader>mm Vap:EasyAlign *\|<cr><esc>
|
nnoremap <Leader>mm Vap:EasyAlign *\|<cr><esc>
|
||||||
nnoremap <F7> Vap:EasyAlign *\|<cr><esc>
|
nnoremap <F7> Vap:EasyAlign *\|<cr><esc>
|
||||||
|
"
|
||||||
" lasse Y wie C oder D funktionieren
|
" lasse Y wie C oder D funktionieren
|
||||||
nmap Y y$
|
nmap Y y$
|
||||||
|
|
||||||
" https://www.reddit.com/r/vim/comments/s1he17/is_there_a_plugin_that_makes_searching_and
|
" https://www.reddit.com/r/vim/comments/s1he17/is_there_a_plugin_that_makes_searching_and
|
||||||
nnoremap <Leader>sr :%s/<C-r><C-w>//gc<Left><Left><Left>
|
nnoremap <Leader>sr :%s/<C-r><C-w>//gc<Left><Left><Left>
|
||||||
vnoremap <Leader>sr y:%s/<C-R>"//gc<Left><Left><Left>
|
vnoremap <Leader>sr y:%s/<C-R>"//gc<Left><Left><Left>
|
||||||
|
|
||||||
" Toggle NERDTree
|
" Toggle NERDTree
|
||||||
nnoremap <F2> :call ToggleNERDTreeFind()<CR>
|
nnoremap <F2> :call ToggleNERDTreeFind()<CR>
|
||||||
|
|
||||||
" toogle floaterm
|
" toogle floaterm
|
||||||
let g:floaterm_keymap_toggle = '<F3>'
|
let g:floaterm_keymap_toggle = '<F3>'
|
||||||
|
|
||||||
" toddle Undotree
|
" toddle Undotree
|
||||||
nnoremap <F6> :UndotreeToggle<CR>
|
nnoremap <F6> :UndotreeToggle<CR>
|
||||||
nnoremap <Leader>u :UndotreeToggle<CR>
|
nnoremap <Leader>u :UndotreeToggle<CR>
|
||||||
" surround words with backticks
|
|
||||||
nnoremap <F8> ciw``<C-r>"``<Esc>
|
|
||||||
xnoremap <F8> c``<C-r>"``<Esc>
|
|
||||||
|
|
||||||
" besseres undo
|
" besseres undo
|
||||||
" https://www.reddit.com/r/vim/comments/13gk0nl/is_there_a_way_to_make_undo_sensible/
|
" https://www.reddit.com/r/vim/comments/13gk0nl/is_there_a_way_to_make_undo_sensible/
|
||||||
|
@ -219,13 +223,13 @@ inoremap \" \"<c-g>u
|
||||||
inoremap <space> <space><c-g>u
|
inoremap <space> <space><c-g>u
|
||||||
inoremap <CR> <CR><c-g>u
|
inoremap <CR> <CR><c-g>u
|
||||||
|
|
||||||
|
|
||||||
" ### Abbreviations
|
" ### Abbreviations
|
||||||
iabbrev ncicht nicht
|
iabbrev ncicht nicht
|
||||||
iabbrev nciht nicht
|
iabbrev nciht nicht
|
||||||
|
|
||||||
" linenumbers
|
" linenumbers
|
||||||
nnoremap <Leader>z :set nonumber! norelativenumber!<CR>
|
nnoremap <Leader>z :set nonumber! norelativenumber!<CR>
|
||||||
|
|
||||||
" https://jeffkreeftmeijer.com/vim-number/
|
" https://jeffkreeftmeijer.com/vim-number/
|
||||||
:augroup numbertoggle
|
:augroup numbertoggle
|
||||||
: autocmd!
|
: autocmd!
|
||||||
|
|
Loading…
Reference in a new issue