syntax
This commit is contained in:
parent
9194111fdb
commit
754358f43b
1 changed files with 100 additions and 109 deletions
209
.vimrc
209
.vimrc
|
@ -1,6 +1,3 @@
|
||||||
" leader key
|
|
||||||
:let mapleader = ","
|
|
||||||
|
|
||||||
" Vundle
|
" Vundle
|
||||||
set nocompatible
|
set nocompatible
|
||||||
filetype off
|
filetype off
|
||||||
|
@ -8,20 +5,20 @@ 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
|
" Let Vundle manage Vundle; muss immer der erste eintrag sein
|
||||||
Plugin 'VundleVim/Vundle.vim' "muss immer der erste eintrag sein
|
Plugin 'VundleVim/Vundle.vim'
|
||||||
Plugin 'nestorsalceda/vim-strip-trailing-whitespaces'
|
Plugin 'nestorsalceda/vim-strip-trailing-whitespaces'
|
||||||
" entferne trailing whitespaces
|
" entferne trailing whitespaces
|
||||||
Plugin 'itchyny/lightline.vim'
|
Plugin 'itchyny/lightline.vim'
|
||||||
" statusline
|
" statusline
|
||||||
Plugin 'sheerun/vim-polyglot'
|
Plugin 'sheerun/vim-polyglot'
|
||||||
"languagepack
|
" languagepack
|
||||||
Plugin 'Xuyuanp/nerdtree-git-plugin'
|
Plugin 'Xuyuanp/nerdtree-git-plugin'
|
||||||
" nerdtree plugin, markiere datein mit git symbolen
|
" nerdtree plugin, markiere dateien mit git symbolen
|
||||||
Plugin 'jeetsukumaran/vim-buffergator'
|
Plugin 'jeetsukumaran/vim-buffergator'
|
||||||
" bufgfer wechseln
|
" buffer wechseln
|
||||||
Plugin 'mhinz/vim-signify'
|
Plugin 'mhinz/vim-signify'
|
||||||
" change icons neben zeilennummerierung
|
" change icons neben der zeilennummerierung
|
||||||
Plugin 'ctrlpvim/ctrlp.vim'
|
Plugin 'ctrlpvim/ctrlp.vim'
|
||||||
" fuzzy finder
|
" fuzzy finder
|
||||||
Plugin 'lifepillar/vim-solarized8'
|
Plugin 'lifepillar/vim-solarized8'
|
||||||
|
@ -33,94 +30,14 @@ Plugin 'tpope/vim-fugitive'
|
||||||
Plugin 'jiangmiao/auto-pairs'
|
Plugin 'jiangmiao/auto-pairs'
|
||||||
" autovervollständigung symbole wie klammern
|
" autovervollständigung symbole wie klammern
|
||||||
Plugin 'preservim/nerdtree'
|
Plugin 'preservim/nerdtree'
|
||||||
" dateiobrowser
|
" dateibrowser
|
||||||
Plugin 'unkiwii/vim-nerdtree-sync'
|
Plugin 'unkiwii/vim-nerdtree-sync'
|
||||||
" springe in nerdtree zur geöffneten datei
|
" springe in nerdtree zur geöffneten datei
|
||||||
Plugin 'jreybert/vimagit'
|
Plugin 'jreybert/vimagit'
|
||||||
"git integration
|
" git integration
|
||||||
"
|
|
||||||
"
|
|
||||||
" Install:
|
|
||||||
" vim +PluginInstall +qall
|
|
||||||
" oder
|
|
||||||
" :PluginInstall
|
|
||||||
call vundle#end()
|
call vundle#end()
|
||||||
"
|
|
||||||
" auto-pairs
|
|
||||||
let g:AutoPairsShortcutToggle = '<C-P>'
|
|
||||||
" Toogle Auto-Pairs mit Strg+P
|
|
||||||
" zur Autovervollständigung von Klammern
|
|
||||||
"
|
|
||||||
" lightline/statusline
|
|
||||||
set laststatus=2
|
|
||||||
let g:lightline = {
|
|
||||||
\ 'colorscheme': 'wombat',
|
|
||||||
\ 'active': {
|
|
||||||
\ 'left': [ [ 'mode', 'paste' ],
|
|
||||||
\ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ]
|
|
||||||
\ },
|
|
||||||
\ 'component_function': {
|
|
||||||
\ 'gitbranch': 'FugitiveHead'
|
|
||||||
\ },
|
|
||||||
\ }
|
|
||||||
" NERDtree + nerdtree-sync
|
|
||||||
"https://github.com/preservim/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
|
|
||||||
" Start NERDTree when Vim is started without file arguments.
|
|
||||||
autocmd StdinReadPre * let s:std_in=1
|
|
||||||
autocmd VimEnter * if argc() == 0 && !exists('s:std_in') | NERDTree | endif
|
|
||||||
let g:nerdtree_sync_cursorline = 1 " highlight the file in tree
|
|
||||||
" open the existing NERDTree on each new tab.
|
|
||||||
"autocmd BufWinEnter * silent NERDTreeMirror
|
|
||||||
"
|
|
||||||
" exit Vim if NERDTree is the only window left.
|
|
||||||
autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() |
|
|
||||||
\ quit | endif
|
|
||||||
"
|
|
||||||
" buffers
|
|
||||||
" 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 is almost a must if you wish to use buffers in this way.
|
|
||||||
set hidden
|
|
||||||
"
|
|
||||||
" To open a new empty buffer
|
|
||||||
" This replaces :tabnew which I used to bind to this mapping
|
|
||||||
nmap <C-t> :enew<cr>
|
|
||||||
"
|
|
||||||
"" Move to the next buffer
|
|
||||||
nmap <C-l> :bnext<CR>
|
|
||||||
|
|
||||||
" Move to the previous buffer
|
|
||||||
nmap <C-h> :bprevious<CR>
|
|
||||||
"
|
|
||||||
" Close the current buffer and move to the previous one
|
|
||||||
" This replicates the idea of closing a tab
|
|
||||||
nmap <C-q> :bp <BAR> bd #<CR>
|
|
||||||
"
|
|
||||||
" nerdtree-git-plugin
|
|
||||||
let g:NERDTreeGitStatusIndicatorMapCustom = {
|
|
||||||
\ 'Modified' :'*',
|
|
||||||
\ 'Staged' :'+',
|
|
||||||
\ 'Untracked' :'',
|
|
||||||
\ 'Renamed' :'*',
|
|
||||||
\ 'Unmerged' :'',
|
|
||||||
\ 'Deleted' :'-',
|
|
||||||
\ 'Dirty' :'',
|
|
||||||
\ 'Ignored' :'',
|
|
||||||
\ 'Clean' :'',
|
|
||||||
\ 'Unknown' :'?',
|
|
||||||
\ }
|
|
||||||
"
|
|
||||||
"
|
|
||||||
" indentLine
|
|
||||||
" fügt vertikale Striche bei Einrückungen ein
|
|
||||||
filetype plugin indent on
|
|
||||||
"
|
|
||||||
" allgemeine Optionen
|
" allgemeine Optionen
|
||||||
set showcmd
|
set showcmd
|
||||||
set showbreak=+++
|
set showbreak=+++
|
||||||
|
@ -141,21 +58,97 @@ set softtabstop=4
|
||||||
set ruler
|
set ruler
|
||||||
set undolevels=1000
|
set undolevels=1000
|
||||||
set backspace=indent,eol,start
|
set backspace=indent,eol,start
|
||||||
set nu " Enable line numbers
|
set nu " Enable line numbers
|
||||||
syntax on " Enable syntax highlighting
|
syntax on " Enable syntax highlighting
|
||||||
set tabstop=4 " How many columns of whitespace a \t is worth
|
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 shiftwidth=4 " How many columns of whitespace a level of indentation is worth
|
||||||
set expandtab " Use spaces when tabbing
|
set expandtab " Use spaces when tabbing
|
||||||
set incsearch " Enable incremental search
|
set incsearch " Enable incremental search
|
||||||
set hlsearch " Enable highlight search
|
set hlsearch " Enable highlight search
|
||||||
set termwinsize=12x0 " Set terminal size
|
set termwinsize=12x0 " Set terminal size
|
||||||
set splitbelow " Always split below
|
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
|
||||||
|
|
||||||
|
" Keybindings"
|
||||||
|
:let mapleader = ","
|
||||||
|
|
||||||
|
|
||||||
|
" auto-pairs
|
||||||
|
let g:AutoPairsShortcutToggle = '<C-P>'
|
||||||
|
|
||||||
|
|
||||||
|
" lightline/statusline
|
||||||
|
set laststatus=2
|
||||||
|
let g:lightline = {
|
||||||
|
\ 'colorscheme': 'wombat',
|
||||||
|
\ 'active': {
|
||||||
|
\ 'left': [ [ 'mode', 'paste' ],
|
||||||
|
\ [ 'gitbranch', 'readonly', 'filename', 'modified' ] ]
|
||||||
|
\ },
|
||||||
|
\ 'component_function': {
|
||||||
|
\ 'gitbranch': 'FugitiveHead'
|
||||||
|
\ },
|
||||||
|
\ }
|
||||||
|
|
||||||
|
|
||||||
|
" NERDtree + nerdtree-sync
|
||||||
|
" https://github.com/preservim/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
|
||||||
|
" Start NERDTree when Vim is started without file arguments.
|
||||||
|
autocmd StdinReadPre * let s:std_in=1
|
||||||
|
autocmd VimEnter * if argc() == 0 && !exists('s:std_in') | NERDTree | endif
|
||||||
|
let g:nerdtree_sync_cursorline = 1 " highlight the file in tree
|
||||||
|
" exit Vim if NERDTree is the only window left.
|
||||||
|
autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() |
|
||||||
|
\ quit | endif
|
||||||
|
|
||||||
|
|
||||||
|
" buffergator
|
||||||
|
" 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 is almost a must if you wish to use buffers in this way.
|
||||||
|
set hidden
|
||||||
|
" To open a new empty buffer
|
||||||
|
nmap <C-t> :enew<cr>
|
||||||
|
Move to the next buffer
|
||||||
|
nmap <C-l> :bnext<CR>
|
||||||
|
" Move to the previous buffer
|
||||||
|
nmap <C-h> :bprevious<CR>
|
||||||
|
" Close the current buffer and move to the previous one
|
||||||
|
" This replicates the idea of closing a tab
|
||||||
|
nmap <C-q> :bp <BAR> bd #<CR>
|
||||||
|
|
||||||
|
|
||||||
|
" nerdtree-git-plugin
|
||||||
|
let g:NERDTreeGitStatusIndicatorMapCustom = {
|
||||||
|
\ 'Modified' :'*',
|
||||||
|
\ 'Staged' :'+',
|
||||||
|
\ 'Untracked' :'',
|
||||||
|
\ 'Renamed' :'*',
|
||||||
|
\ 'Unmerged' :'',
|
||||||
|
\ 'Deleted' :'-',
|
||||||
|
\ 'Dirty' :'',
|
||||||
|
\ 'Ignored' :'',
|
||||||
|
\ 'Clean' :'',
|
||||||
|
\ 'Unknown' :'?',
|
||||||
|
\ }
|
||||||
|
|
||||||
|
|
||||||
|
" indentLine
|
||||||
|
" fügt vertikale Striche bei Einrückungen ein
|
||||||
|
filetype plugin indent on
|
||||||
|
|
||||||
|
|
||||||
" aussehen
|
" aussehen
|
||||||
set background=dark " dark or light
|
set background=dark " dark or light
|
||||||
colorscheme solarized8 " Your favorite color scheme's name
|
colorscheme solarized8 " Your favorite color scheme's name
|
||||||
"
|
|
||||||
|
|
||||||
" ripgrep und ctrlp
|
" ripgrep und ctrlp
|
||||||
" sudo apt install ripgrep(rg)
|
" sudo apt install ripgrep(rg)
|
||||||
if executable('rg')
|
if executable('rg')
|
||||||
|
@ -170,19 +163,17 @@ let g:ctrlp_custom_ignore = '\v[\/]\.(git|hg|svn)$'
|
||||||
|
|
||||||
"https://jeffkreeftmeijer.com/vim-number/
|
"https://jeffkreeftmeijer.com/vim-number/
|
||||||
set number relativenumber
|
set number relativenumber
|
||||||
|
|
||||||
augroup numbertoggle
|
augroup numbertoggle
|
||||||
autocmd!
|
autocmd!
|
||||||
autocmd BufEnter,FocusGained,InsertLeave * set relativenumber
|
autocmd BufEnter,FocusGained,InsertLeave * set relativenumber
|
||||||
autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber
|
autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber
|
||||||
augroup END
|
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
|
" toggle linenumbers
|
||||||
nmap <Leader>c :set norelativenumber!<CR>:set nonu!<CR>
|
nmap <Leader>c :set norelativenumber!<CR>:set nonu!<CR>
|
||||||
" VON vim NACH xxx kopieren
|
|
||||||
" https://unix.stackexchange.com/questions/12535/how-to-copy-text-from-vim-to-an-external-program
|
|
||||||
set clipboard=unnamedplus
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue