vim: vimrc aufgeräumt
This commit is contained in:
parent
c843291b86
commit
aa842fa6f8
1 changed files with 58 additions and 46 deletions
104
.vimrc
104
.vimrc
|
@ -4,8 +4,7 @@ filetype off
|
||||||
set rtp+=~/.vim/bundle/Vundle.vim
|
set rtp+=~/.vim/bundle/Vundle.vim
|
||||||
" Download plug-ins to the ~/.vim/plugged/ directory
|
" Download plug-ins to the ~/.vim/plugged/ directory
|
||||||
call vundle#begin('~/.vim/plugged')
|
call vundle#begin('~/.vim/plugged')
|
||||||
" Let Vundle manage Vundle; muss immer der erste eintrag sein
|
" Let Vundle manage Vundle; muss immer der erste Eintrag sein
|
||||||
|
|
||||||
Plugin 'VundleVim/Vundle.vim'
|
Plugin 'VundleVim/Vundle.vim'
|
||||||
" statusline
|
" statusline
|
||||||
Plugin 'itchyny/lightline.vim'
|
Plugin 'itchyny/lightline.vim'
|
||||||
|
@ -20,48 +19,58 @@ Plugin 'tpope/vim-sleuth'
|
||||||
call vundle#end()
|
call vundle#end()
|
||||||
|
|
||||||
|
|
||||||
" allgemeine Optionen
|
" ### allgemeine Optionen
|
||||||
set showcmd " Show (partial) command in status line.
|
" ### Suche
|
||||||
|
" While typing a search command, show immediately where the so far typed pattern matches.
|
||||||
|
set incsearch
|
||||||
|
" global bei suche immer mit an
|
||||||
|
set gdefault
|
||||||
|
" When there is a previous search pattern, highlight all its matches.
|
||||||
|
set hlsearch
|
||||||
|
" Ignore case in search patterns.
|
||||||
|
set ignorecase
|
||||||
|
" Override the 'ignorecase' option if the search pattern contains upper case characters.
|
||||||
|
set smartcase
|
||||||
|
|
||||||
|
" ### Nummern
|
||||||
|
" Show line numbers.
|
||||||
|
set number
|
||||||
|
" toggle linenumbers
|
||||||
|
nmap <C-n> :set nonu!<CR>
|
||||||
|
|
||||||
|
" ### 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
|
||||||
|
set wildmode=longest,list,full
|
||||||
|
set wildmenu
|
||||||
|
set wildignore=*.o,*~
|
||||||
|
|
||||||
|
" ### Rest
|
||||||
|
" Show (partial) command in status line.
|
||||||
|
set showcmd
|
||||||
set virtualedit=onemore
|
set virtualedit=onemore
|
||||||
set encoding=UTF-8
|
set encoding=UTF-8
|
||||||
set visualbell
|
set visualbell
|
||||||
set ruler
|
set ruler
|
||||||
set undolevels=1000
|
set undolevels=1000
|
||||||
set backspace=indent,eol,start
|
set backspace=indent,eol,start
|
||||||
set hidden " ermögliche das bearbiete buffer in der hintergrund können
|
" ermögliche das bearbeitete buffer in der hintergrund können
|
||||||
set ignorecase " Ignore case in search patterns.
|
set hidden
|
||||||
set smartcase " Override the 'ignorecase' option if the search pattern contains upper case characters.
|
" verhindert zeilenumbrüche
|
||||||
|
set nowrap
|
||||||
set nowrap " verhindert zeilenumbrüche
|
|
||||||
set showbreak=+++
|
set showbreak=+++
|
||||||
set wrap linebreak " https://vim.fandom.com/wiki/Automatic_word_wrapping
|
" https://vim.fandom.com/wiki/Automatic_word_wrapping
|
||||||
|
set wrap linebreak
|
||||||
|
" Enable syntax highlighting
|
||||||
|
syntax on
|
||||||
|
" Enable mouse drag on window splits
|
||||||
|
set mouse=a
|
||||||
|
" https://unix.stackexchange.com/questions/12535/how-to-copy-text-from-vim-to-an-external-program
|
||||||
|
set clipboard=unnamedplus
|
||||||
|
" zeige "matching" klammer usw.
|
||||||
|
set showmatch
|
||||||
|
|
||||||
set hlsearch " When there is a previous search pattern, highlight all its matches.
|
" ### Plugins"
|
||||||
set gdefault " global bei suche immer mit an
|
" ### lightline/statusline
|
||||||
set incsearch " While typing a search command, show immediately where the so far typed pattern matches.
|
|
||||||
|
|
||||||
set number " Show line numbers.
|
|
||||||
" toggle linenumbers
|
|
||||||
nmap <C-n> :set nonu!<CR>
|
|
||||||
|
|
||||||
syntax on " Enable syntax highlighting
|
|
||||||
set shiftwidth=4 " Number of spaces to use for each step of (auto)indent.
|
|
||||||
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
|
|
||||||
|
|
||||||
" Keybindings
|
|
||||||
" Ctrl+S zum speichern
|
|
||||||
nmap <C-s> :w<CR>
|
|
||||||
" ctrl+W zum schließen
|
|
||||||
nmap <C-w> :q<CR>
|
|
||||||
" ctrl+P: set paste
|
|
||||||
nmap <C-p> :set paste!<CR>
|
|
||||||
" ctrl+t fuer neuen tab
|
|
||||||
nmap <C-t> :tabnew<CR>
|
|
||||||
" leader-key
|
|
||||||
:let mapleader = ","
|
|
||||||
|
|
||||||
" lightline/statusline
|
|
||||||
" blende insert/visual/... in der commandline aus, steht in lightline
|
" blende insert/visual/... in der commandline aus, steht in lightline
|
||||||
set noshowmode
|
set noshowmode
|
||||||
set laststatus=2
|
set laststatus=2
|
||||||
|
@ -75,9 +84,7 @@ let g:lightline = {
|
||||||
\ },
|
\ },
|
||||||
\ }
|
\ }
|
||||||
|
|
||||||
|
" ### ripgrep und ctrlp
|
||||||
|
|
||||||
" ripgrep und ctrlp
|
|
||||||
" sudo apt install ripgrep(rg)
|
" sudo apt install ripgrep(rg)
|
||||||
if executable('rg')
|
if executable('rg')
|
||||||
let g:ctrlp_user_command = 'rg %s --files --hidden --color=never --glob ""'
|
let g:ctrlp_user_command = 'rg %s --files --hidden --color=never --glob ""'
|
||||||
|
@ -92,11 +99,16 @@ let g:ctrlp_custom_ignore = '\v[\/]\.(git|hg|svn)$'
|
||||||
" stelle standard keybinding um
|
" stelle standard keybinding um
|
||||||
let g:ctrlp_map = ''
|
let g:ctrlp_map = ''
|
||||||
|
|
||||||
" 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
|
|
||||||
set wildmode=longest,list,full
|
|
||||||
set wildmenu
|
|
||||||
set wildignore=*.o,*~
|
|
||||||
|
|
||||||
" zeige "matching" klammer usw.
|
|
||||||
set showmatch
|
" ### Keybindings
|
||||||
|
" Ctrl+S zum speichern
|
||||||
|
nmap <C-s> :w<CR>
|
||||||
|
" ctrl+W zum schließen
|
||||||
|
nmap <C-w> :q<CR>
|
||||||
|
" ctrl+P: set paste
|
||||||
|
nmap <C-p> :set paste!<CR>
|
||||||
|
" ctrl+t fuer neuen tab
|
||||||
|
nmap <C-t> :tabnew<CR>
|
||||||
|
" leader-key
|
||||||
|
:let mapleader = ","
|
||||||
|
|
Loading…
Reference in a new issue