vim: umsortiert + cheatsheet
This commit is contained in:
parent
c5b648088e
commit
5226660d47
2 changed files with 24 additions and 59 deletions
62
.vimrc
62
.vimrc
|
@ -34,38 +34,42 @@ call vundle#end()
|
||||||
|
|
||||||
" allgemeine Optionen
|
" allgemeine Optionen
|
||||||
set showcmd " Show (partial) command in status line.
|
set showcmd " Show (partial) command in status line.
|
||||||
set showbreak=+++
|
|
||||||
set wrap linebreak "https://vim.fandom.com/wiki/Automatic_word_wrapping
|
|
||||||
set virtualedit=onemore
|
set virtualedit=onemore
|
||||||
set showmatch " When a bracket is inserted, briefly jump to the matching
|
|
||||||
" one. The jump is only done if the match can be seen on the
|
|
||||||
" screen. The time to show the match can be set with
|
|
||||||
" 'matchtime'.set virtualedit=onemore
|
|
||||||
set encoding=UTF-8
|
set encoding=UTF-8
|
||||||
set visualbell
|
set visualbell
|
||||||
set smartcase " Override the 'ignorecase' option if the search pattern
|
|
||||||
" contains upper case characters.
|
|
||||||
set hlsearch " When there is a previous search pattern, highlight all
|
|
||||||
" its matches.
|
|
||||||
set gdefault "global bei suche immer mit an"
|
|
||||||
set nowrap "verhindert zeilenumbrüche
|
|
||||||
set ignorecase " Ignore case in search patterns.
|
|
||||||
set incsearch " While typing a search command, show immediately where the
|
|
||||||
" so far typed pattern matches.
|
|
||||||
set ruler
|
set ruler
|
||||||
set undolevels=1000
|
set undolevels=1000
|
||||||
set backspace=indent,eol,start
|
set backspace=indent,eol,start
|
||||||
|
|
||||||
|
set ignorecase " Ignore case in search patterns.
|
||||||
|
set smartcase " Override the 'ignorecase' option if the search pattern contains upper case characters.
|
||||||
|
|
||||||
|
set nowrap " verhindert zeilenumbrüche
|
||||||
|
set showbreak=+++
|
||||||
|
set wrap linebreak " https://vim.fandom.com/wiki/Automatic_word_wrapping
|
||||||
|
|
||||||
|
set hlsearch " When there is a previous search pattern, highlight all its matches.
|
||||||
|
set gdefault " global bei suche immer mit an
|
||||||
|
set incsearch " While typing a search command, show immediately where the so far typed pattern matches.
|
||||||
|
|
||||||
set number " Show line numbers.
|
set number " Show line numbers.
|
||||||
|
"https://jeffkreeftmeijer.com/vim-number/
|
||||||
|
set number relativenumber
|
||||||
|
augroup numbertoggle
|
||||||
|
autocmd!
|
||||||
|
autocmd BufEnter,FocusGained,InsertLeave * set relativenumber
|
||||||
|
autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber
|
||||||
|
augroup END
|
||||||
|
" toggle linenumbers
|
||||||
|
nmap <Leader>c :set norelativenumber!<CR>:set nonu!<CR>
|
||||||
|
|
||||||
syntax on " Enable syntax highlighting
|
syntax on " Enable syntax highlighting
|
||||||
set shiftwidth=4 " Number of spaces to use for each step of (auto)indent.
|
set shiftwidth=4 " Number of spaces to use for each step of (auto)indent.
|
||||||
set incsearch " Enable incremental search
|
|
||||||
set hlsearch " Enable highlight search
|
|
||||||
set termwinsize=12x0 " Set terminal size
|
|
||||||
set splitbelow " Always split below
|
|
||||||
set mouse=a " Enable mouse drag on window splits
|
set mouse=a " Enable mouse drag on window splits
|
||||||
set clipboard=unnamedplus " https://unix.stackexchange.com/questions/12535/how-to-copy-text-from-vim-to-an-external-program
|
set clipboard=unnamedplus " https://unix.stackexchange.com/questions/12535/how-to-copy-text-from-vim-to-an-external-program
|
||||||
|
|
||||||
" Keybindings"
|
" Keybindings
|
||||||
|
" leader-key
|
||||||
:let mapleader = ","
|
:let mapleader = ","
|
||||||
|
|
||||||
" lightline/statusline
|
" lightline/statusline
|
||||||
|
@ -81,8 +85,6 @@ let g:lightline = {
|
||||||
\ },
|
\ },
|
||||||
\ }
|
\ }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
" buffergator
|
" buffergator
|
||||||
" https://joshldavis.com/2014/04/05/vim-tab-madness-buffers-vs-tabs/
|
" https://joshldavis.com/2014/04/05/vim-tab-madness-buffers-vs-tabs/
|
||||||
" This allows buffers to be hidden if you've modified a buffer.
|
" This allows buffers to be hidden if you've modified a buffer.
|
||||||
|
@ -116,26 +118,10 @@ set wildignore+=*/tmp/*,*.so,*.swp,*.zip " MacOSX/Linux
|
||||||
set wildignore+=*\\tmp\\*,*.swp,*.zip,*.exe " Windows
|
set wildignore+=*\\tmp\\*,*.swp,*.zip,*.exe " Windows
|
||||||
let g:ctrlp_custom_ignore = '\v[\/]\.(git|hg|svn)$'
|
let g:ctrlp_custom_ignore = '\v[\/]\.(git|hg|svn)$'
|
||||||
|
|
||||||
"https://jeffkreeftmeijer.com/vim-number/
|
|
||||||
set number relativenumber
|
|
||||||
augroup numbertoggle
|
|
||||||
autocmd!
|
|
||||||
autocmd BufEnter,FocusGained,InsertLeave * set relativenumber
|
|
||||||
autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber
|
|
||||||
augroup END
|
|
||||||
|
|
||||||
|
|
||||||
" vimagit
|
" vimagit
|
||||||
" https://github.com/jreybert/vimagit#mappings
|
" https://github.com/jreybert/vimagit#mappings
|
||||||
nmap <Leader>m :Magit<cr>
|
nmap <Leader>m :Magit<cr>
|
||||||
|
|
||||||
|
|
||||||
" toggle linenumbers
|
|
||||||
nmap <Leader>c :set norelativenumber!<CR>:set nonu!<CR>
|
|
||||||
|
|
||||||
" speichern
|
|
||||||
nmap <Leader>s :w<CR>
|
|
||||||
|
|
||||||
" 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
|
||||||
|
|
|
@ -12,11 +12,6 @@
|
||||||
`<C-T>` öffne als neuen tab
|
`<C-T>` öffne als neuen tab
|
||||||
`<C-X>` öffne als horizontalen Split(nur ctrlp)
|
`<C-X>` öffne als horizontalen Split(nur ctrlp)
|
||||||
|
|
||||||
## NERDtree
|
|
||||||
`m` Menü
|
|
||||||
`i` horizontaler Split
|
|
||||||
`s` vertikaler Split
|
|
||||||
|
|
||||||
## Übersicht Buffer
|
## Übersicht Buffer
|
||||||
`<Leader> b`
|
`<Leader> b`
|
||||||
|
|
||||||
|
@ -24,22 +19,6 @@
|
||||||
`<C-t>` neuer Buffer
|
`<C-t>` neuer Buffer
|
||||||
`<C-l>` nächster Buffer
|
`<C-l>` nächster Buffer
|
||||||
`<C-h>` letzter Buffer
|
`<C-h>` letzter Buffer
|
||||||
`<C-q>` schließt Buffer und wechselt vorherigen
|
|
||||||
|
|
||||||
## Autovervollständigung von Klammern usw.
|
|
||||||
`<Strg + P>` Toggle on/off
|
|
||||||
|
|
||||||
## NERDtree aufrufen
|
|
||||||
`<F2>`
|
|
||||||
|
|
||||||
## Dateien verschieben
|
|
||||||
* in NERDtree
|
|
||||||
`<m>`
|
|
||||||
`a` hinzufügen
|
|
||||||
`m` move
|
|
||||||
`c` copy
|
|
||||||
`r` remove
|
|
||||||
`l` ls
|
|
||||||
|
|
||||||
## git interactives Staging
|
## git interactives Staging
|
||||||
`:G stage -p` (`alias stagep`)
|
`:G stage -p` (`alias stagep`)
|
||||||
|
|
Loading…
Reference in a new issue