Just .vimrc it

This commit is contained in:
Leon Grünewald 2020-03-12 17:34:24 +01:00
parent 20927f7dbd
commit 780d469265
2 changed files with 141 additions and 142 deletions

View file

@ -1,141 +0,0 @@
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
" Specify a directory for plugins
" - For Neovim: stdpath('data') . '/plugged'
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged')
"" Gitvimbim Wrapper
" Vim Fudgeitive
Plug 'tpope/vim-fugitive'
Plug 'shumphrey/fugitive-gitlab.vim'
Plug 'borissov/fugitive-gitea'
"" Coding Assistance
" Ale: Runs fast and works well.
Plug 'dense-analysis/ale'
" Better HTML PHP support
Plug 'beanworks/vim-phpfmt'
" Guten Tag: Automatically generates ctags (variable names, function, classes)
Plug 'ludovicchabant/vim-gutentags'
" php.vim: PHP syntax higlighting and indent
Plug 'StanAngeloff/php.vim'
" PHP Namespace: Helps to keep track of namespaces and autcompletes them
Plug 'arnaud-lb/vim-php-namespace', {'for': 'php'}
"" Debugger
" v-debug: PHP Debugger with xdebug
Plug 'vim-vdebug/vdebug'
"" GUI
" NERDTree: Sidebar file tree
Plug 'scrooloose/nerdtree'
Plug 'Xuyuanp/nerdtree-git-plugin'
" MINIBUFXPL: A nice buffer explorer
Plug 'fholgado/minibufexpl.vim'
" Airline: Some file infos
Plug 'vim-airline/vim-airline'
"" AutoComplPop: Open the popup menu for autocompletion
Plug 'vim-scripts/AutoComplPop'
"" Indexing
" ctrlp.vim: Quickly find files by name without navigating
Plug 'kien/ctrlp.vim'
" Ferret: Quickly finds file content
Plug 'wincent/ferret'
"" Input optimization
" Vim Surround: Quickly surround stuff
Plug 'tpope/vim-surround'
" Initialize plugin system
call plug#end()
let g:fugitive_gitlab_domains = ['http://gitlab.kreativ.rudel:8001', 'gitlab.kreativ.rudel']
let g:fugitive_gitea_domains = ['https://git.doggoat.de']
"" NERDTree config
" Autostart NERDTree on start
autocmd vimenter * NERDTree | wincmd w
let NERDTreeShowHidden=1
" Close vim if the only window left open is a NERDTree
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
"" ALE config
" Define fixers
let g:ale_fixers = {
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
\ 'javascript': ['eslint'],
\ 'php': ['phpcbf'],
\ 'rust': ['rustfmt'],
\}
" Run linter on save
let g:ale_fix_on_save = 1
let g:ale_linters = {
\ 'rust': ['rls', 'cargo']
\}
" Enable completion where available.
let g:ale_completion_enabled = 1
set omnifunc=ale#completion#OmniFunc
"" Gutentags
" Auto generate ctags on startup
autocmd! User vim-gutentags call gutentags#setup_gutentags()
"" PHP
" PHP Namespace: Automatically use fully qualified name
function! IPhpExpandClass()
call PhpExpandClass()
call feedkeys('a', 'n')
endfunction
autocmd FileType php inoremap <Leader>e <Esc>:call IPhpExpandClass()<CR>
autocmd FileType php noremap <Leader>e :call PhpExpandClass()<CR>
"" vdebug config
" Set xdebug config
let g:vdebug_options = {'ide_key': 'PHPSTORM'}
let g:vdebug_options = {'break_on_open': 0}
let g:vdebug_options = {'server': '172.17.0.1'}
let g:vdebug_options = {'port': '9002'}
" Configure paths
let g:vdebug_options["path_maps"] = { "/var/www/html": "/home/leong/workspace/upwire-2019" }
" Don't break on open
let g:vdebug_options['break_on_open'] = 0
"" CtrlP config
" Self explainatory
let g:ctrlp_max_files=0
let g:ctrlp_max_depth=40
let g:ctrlp_custom_ignore = 'node_modules\|DS_Store\|git'
"" Vim Config
" Some autocompletion settings.
set completeopt+=longest,menuone,menu,preview
" Add clipboard support
set clipboard=unnamedplus
" Intendation
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
set autoindent

142
.vimrc
View file

@ -1 +1,141 @@
source ~/.devconf/vimcfg.vim if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
" Specify a directory for plugins
" - For Neovim: stdpath('data') . '/plugged'
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged')
"" Gitvimbim Wrapper
" Vim Fudgeitive
Plug 'tpope/vim-fugitive'
Plug 'shumphrey/fugitive-gitlab.vim'
Plug 'borissov/fugitive-gitea'
"" Coding Assistance
" Ale: Runs fast and works well.
Plug 'dense-analysis/ale'
" Better HTML PHP support
Plug 'beanworks/vim-phpfmt'
" Guten Tag: Automatically generates ctags (variable names, function, classes)
Plug 'ludovicchabant/vim-gutentags'
" php.vim: PHP syntax higlighting and indent
Plug 'StanAngeloff/php.vim'
" PHP Namespace: Helps to keep track of namespaces and autcompletes them
Plug 'arnaud-lb/vim-php-namespace', {'for': 'php'}
"" Debugger
" v-debug: PHP Debugger with xdebug
Plug 'vim-vdebug/vdebug'
"" GUI
" NERDTree: Sidebar file tree
Plug 'scrooloose/nerdtree'
Plug 'Xuyuanp/nerdtree-git-plugin'
" MINIBUFXPL: A nice buffer explorer
Plug 'fholgado/minibufexpl.vim'
" Airline: Some file infos
Plug 'vim-airline/vim-airline'
"" AutoComplPop: Open the popup menu for autocompletion
Plug 'vim-scripts/AutoComplPop'
"" Indexing
" ctrlp.vim: Quickly find files by name without navigating
Plug 'kien/ctrlp.vim'
" Ferret: Quickly finds file content
Plug 'wincent/ferret'
"" Input optimization
" Vim Surround: Quickly surround stuff
Plug 'tpope/vim-surround'
" Initialize plugin system
call plug#end()
let g:fugitive_gitlab_domains = ['http://gitlab.kreativ.rudel:8001', 'gitlab.kreativ.rudel']
let g:fugitive_gitea_domains = ['https://git.doggoat.de']
"" NERDTree config
" Autostart NERDTree on start
autocmd vimenter * NERDTree | wincmd w
let NERDTreeShowHidden=1
" Close vim if the only window left open is a NERDTree
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
"" ALE config
" Define fixers
let g:ale_fixers = {
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
\ 'javascript': ['eslint'],
\ 'php': ['phpcbf'],
\ 'rust': ['rustfmt'],
\}
" Run linter on save
let g:ale_fix_on_save = 1
let g:ale_linters = {
\ 'rust': ['rls', 'cargo']
\}
" Enable completion where available.
let g:ale_completion_enabled = 1
set omnifunc=ale#completion#OmniFunc
"" Gutentags
" Auto generate ctags on startup
autocmd! User vim-gutentags call gutentags#setup_gutentags()
"" PHP
" PHP Namespace: Automatically use fully qualified name
function! IPhpExpandClass()
call PhpExpandClass()
call feedkeys('a', 'n')
endfunction
autocmd FileType php inoremap <Leader>e <Esc>:call IPhpExpandClass()<CR>
autocmd FileType php noremap <Leader>e :call PhpExpandClass()<CR>
"" vdebug config
" Set xdebug config
let g:vdebug_options = {'ide_key': 'PHPSTORM'}
let g:vdebug_options = {'break_on_open': 0}
let g:vdebug_options = {'server': '172.17.0.1'}
let g:vdebug_options = {'port': '9002'}
" Configure paths
let g:vdebug_options["path_maps"] = { "/var/www/html": "/home/leong/workspace/upwire-2019" }
" Don't break on open
let g:vdebug_options['break_on_open'] = 0
"" CtrlP config
" Self explainatory
let g:ctrlp_max_files=0
let g:ctrlp_max_depth=40
let g:ctrlp_custom_ignore = 'node_modules\|DS_Store\|git'
"" Vim Config
" Some autocompletion settings.
set completeopt+=longest,menuone,menu,preview
" Add clipboard support
set clipboard=unnamedplus
" Intendation
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
set autoindent