This commit is contained in:
Michael Grote 2021-05-27 17:54:53 +02:00
parent 633da7b48d
commit 200746fb43

94
.vimrc
View file

@ -1,4 +1,51 @@
" Vundle
set nocompatible
filetype off
" Set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
" Download plug-ins to the ~/.vim/plugged/ directory
call vundle#begin('~/.vim/plugged')
" Let Vundle manage Vundle
Plugin 'VundleVim/Vundle.vim'
Plugin 'sheerun/vim-polyglot'
Plugin 'ctrlpvim/ctrlp.vim'
Plugin 'lifepillar/vim-solarized8'
Plugin 'Yggdroot/indentLine'
Plugin 'tpope/vim-fugitive'
Plugin 'jiangmiao/auto-pairs'
Plugin 'preservim/nerdtree'
" Install:
" vim +PluginInstall +qall
" oder
" :PluginInstall
call vundle#end()
"
" auto-pairs
let g:AutoPairsShortcutToggle = '<C-P>'
" Toogle Auto-Pairs mit Strg+P
" zur Autovervollständigung von Klammern
"
" NERDtree
let NERDTreeShowHidden = 1 " Show hidden files
let NERDTreeShowLineNumbers = 0 " Hide line numbers
let NERDTreeMinimalMenu = 1 " Use the minimal menu (m)
let NERDTreeWinSize = 31 " Set panel width to 31 columns
nmap <F2> :NERDTreeToggle<CR> " ruft NERDtree mit F2 auf
autocmd StdinReadPre * let s:std_in=1 " Start NERDTree. If a file is specified, move the cursor to its window.
autocmd VimEnter * NERDTree | if argc() > 0 || exists("s:std_in") | wincmd p | endif " Start NERDTree. If a file is specified, move the cursor to its window.
"
" Tastenkürzel
nmap <C-t> :tabnew<CR>
" erstellt neuen tab und öffnet den open-dialog
"
" indentLine
" fügt vertikale Striche bei Einrückungen ein
filetype plugin indent on
"
" allgemeine Optionen
set number
set showcmd
set showtabline=2 " zeigt immer die 'tabline'
set showbreak=+++
set textwidth=100
set showmatch
@ -16,43 +63,30 @@ set softtabstop=4
set ruler
set undolevels=1000
set backspace=indent,eol,start
set nocompatible
filetype off
" Set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
" Download plug-ins to the ~/.vim/plugged/ directory
call vundle#begin('~/.vim/plugged')
" Let Vundle manage Vundle
Plugin 'VundleVim/Vundle.vim'
Plugin 'sheerun/vim-polyglot'
Plugin 'lifepillar/vim-solarized8'
Plugin 'Yggdroot/indentLine'
Plugin 'tpope/vim-fugitive'
Plugin 'jiangmiao/auto-pairs'
Plugin 'preservim/nerdtree'
" install mit vim +PluginInstall +qall
call vundle#end()
filetype plugin indent on
let g:AutoPairsShortcutToggle = '<C-P>' "The auto-pairs plug-in provides a variable specifically for this, which we can set in .vimrc: Pair completion is now toggled whenever we press Ctrl+P in normal mode.
set nu " Enable line numbers
syntax on " Enable syntax highlighting
" How many columns of whitespace a \t is worth
set tabstop=4
" How many columns of whitespace a level of indentation is worth
set shiftwidth=4
" Use spaces when tabbing
set expandtab
set tabstop=4 " How many columns of whitespace a \t is worth
set shiftwidth=4 " How many columns of whitespace a level of indentation is worth
set expandtab " Use spaces when tabbing
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
"
" aussehen
set background=light " dark or light
colorscheme solarized8 " Your favorite color scheme's name
let NERDTreeShowHidden = 1 " Show hidden files
let NERDTreeShowLineNumbers = 0 " Hide line numbers
let NERDTreeMinimalMenu = 1 " Use the minimal menu (m)
let NERDTreeWinSize = 31 " Set panel width to 31 columns
nmap <F2> :NERDTreeToggle<CR> " nmap <F2> :NERDTreeToggle<CR>
"
" ripgrep und ctrlp
" sudo apt install ripgrep(rg)
if executable('rg')
let g:ctrlp_user_command = 'rg %s --files --hidden --color=never --glob ""'
endif
let g:ctrlp_map = '<c-f>' "aufruf mit strg+f
" ignore files
" https://github.com/ctrlpvim/ctrlp.vim
set wildignore+=*/tmp/*,*.so,*.swp,*.zip " MacOSX/Linux
set wildignore+=*\\tmp\\*,*.swp,*.zip,*.exe " Windows
let g:ctrlp_custom_ignore = '\v[\/]\.(git|hg|svn)$'