From 0c237f4e4f63ab6f86fc2657302850d061d0e291 Mon Sep 17 00:00:00 2001 From: Jannik ZANDER Date: Tue, 10 Jul 2018 17:05:14 +0200 Subject: [PATCH] New gvimrc file with fix for 'cant open file' --- .gitmodules | 3 + .vim/gvimrc | 20 ++++++ .vim/pack/github/opt/vim-pandoc-syntax | 1 + .vim/vimrc | 90 +++++++++++--------------- 4 files changed, 63 insertions(+), 51 deletions(-) create mode 100644 .vim/gvimrc create mode 160000 .vim/pack/github/opt/vim-pandoc-syntax diff --git a/.gitmodules b/.gitmodules index 851871d..40caae1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -43,3 +43,6 @@ [submodule ".vim/pack/github/opt/bclose.vim"] path = .vim/pack/github/opt/bclose.vim url = https://github.com/rbgrouleff/bclose.vim.git +[submodule ".vim/pack/github/opt/vim-pandoc-syntax"] + path = .vim/pack/github/opt/vim-pandoc-syntax + url = https://github.com/vim-pandoc/vim-pandoc-syntax.git diff --git a/.vim/gvimrc b/.vim/gvimrc new file mode 100644 index 0000000..17d79bf --- /dev/null +++ b/.vim/gvimrc @@ -0,0 +1,20 @@ + +set shell=cmd +set shellcmdflag=/c + +highlight normal guibg=black guifg=white +highlight linenr guifg=grey +set guioptions+=a +set guioptions-=m "menu bar + set guioptions-=T "toolbar set guioptions-=r "scroolbar + set encoding=utf-8 +if exists("&guifont") + if has("mac") + set guifont=monaco:h11 + elseif has("unix") + set guifont=inconsolata\ 11 + elseif has("win32") +" set guifont=consolas:h11,courier\ new:h10 + set guifont=consolas:h10:cANSI:qDRAFT + endif +endif diff --git a/.vim/pack/github/opt/vim-pandoc-syntax b/.vim/pack/github/opt/vim-pandoc-syntax new file mode 160000 index 0000000..56e8e41 --- /dev/null +++ b/.vim/pack/github/opt/vim-pandoc-syntax @@ -0,0 +1 @@ +Subproject commit 56e8e41ef863a0a7d33d85c3c0c895aa6e9e62d3 diff --git a/.vim/vimrc b/.vim/vimrc index 59977b1..35f1ff7 100644 --- a/.vim/vimrc +++ b/.vim/vimrc @@ -10,7 +10,6 @@ set sessionoptions-=options " files set fileformats=unix,dos,mac set fileignorecase -set wildignore+=tags,.*.un~,*.pyc setglobal tags-=./tags tags-=./tags; tags^=./tags; " copy and paste @@ -48,16 +47,6 @@ set smartcase set showmatch set complete-=i -" command and status line -set laststatus=2 -set ruler -set wildmenu -set wildmode=longest:full,full -set showcmd -set cmdheight=2 -set shortmess=aoOtI -set history=1000 - " scroll set scrolloff=1 set sidescrolloff=5 @@ -72,9 +61,16 @@ set foldlevel=1 set foldclose=all set foldopen+=jump,search -" mouse -set mouse=a -set mousemodel=extend +" command line +set wildmenu +set wildmode=longest:full,full +set wildignore+=tags,*.pyc,*.jpg,*.png,*.gif +set showcmd +set ruler +set laststatus=2 +set cmdheight=2 +set shortmess=aoOtI +set history=1000 " keyboard set backspace=indent,eol,start @@ -83,8 +79,12 @@ set ttimeoutlen=100 set timeout set timeoutlen=500 set winaltkeys=no +set mouse=a +set mousemodel=extend +set noerrorbells set visualbell + " colors and fonts set t_Co=256 set background=dark @@ -94,35 +94,14 @@ let &t_EI.="\e[1 q" let &t_te.="\e[0 q" highlight LineNr ctermfg=grey -" gvim -if (has("gui_running")) - highlight Normal guibg=black guifg=white - highlight LineNr guifg=grey - set guioptions+=a - set guioptions-=m "menu bar - set guioptions-=T "toolbar - set guioptions-=r "scroolbar - set encoding=utf-8 - if exists("&guifont") - if has("mac") - set guifont=monaco:h11 - elseif has("unix") - set guifont=inconsolata\ 11 - elseif has("win32") -" set guifont=consolas:h11,courier\ new:h10 - set guifont=consolas:h10:cANSI:qDRAFT - endif - endif -endif - - " make "set makeprg=cmake\ --build\ . -set makeprg=msbuild -set errorformat=\ %#%f(%l):\ %m " Visual studio 2013 +"set makeprg=msbuild +"set errorformat=\ %#%f(%l):\ %m " Visual studio 2013 "set errorformat=%.%#>\ %#%f(%l)\ :\ %m " Visual studio 2008 "set makeprg=vim-iarbuild.cmd " IAR compiler "set errorformat=%f(%l)\ :\ %m +set makeprg=doxygen " grep set grepprg=ag\ --vimgrep\ --skip-vcs-ignores\ --path-to-ignore\ ~/.ignore\ --cpp\ --cc @@ -139,8 +118,9 @@ nnoremap nnoremap nnoremap :bnext nnoremap :bNext -" Press to turn off highlighting and clear any message already displayed. -nnoremap :nohlsearch:echo +nnoremap + :exe "resize " . (winheight(0) * 3/2) +nnoremap - :exe "resize " . (winheight(0) * 2/3) +nnoremap :nohlsearch:echo " Insert mode Mappings inoremap u @@ -187,11 +167,7 @@ let g:airline#extensions#tabline#enabled = 1 packadd editorconfig-vim let g:editorconfig_exclude_patterns = ['fugitive://.*', 'scp://.*'] let g:editorconfig_verbose = 1 -if has("win32") - let g:EditorConfig_exec_path = "C:\programs\editorconfig\bin\editorconfig.exe" -else - let g:editorconfig_core_mode = "python_builtin" -endif +let g:editorconfig_core_mode = "python_builtin" " CtrlP packadd ctrlp.vim @@ -204,19 +180,31 @@ nnoremap m :CtrlPMRU " autocommands -autocmd BufReadPost quickfix nnoremap -autocmd bufnewfile,bufread *.md set filetype=markdown -autocmd bufnewfile,bufread *.gradle set filetype=groovy +autocmd bufreadpost quickfix nnoremap + +augroup filetype + autocmd! + autocmd! bufnewfile,buffilepre,bufread *.md set filetype=markdown + autocmd bufnewfile,buffilepre,bufread *.gradle set filetype=groovy + autocmd bufnewfile,buffilepre,bufread *.json set filetype=json + autocmd bufnewfile,buffilepre,bufread *.yml set filetype=yaml +augroup END augroup saveall autocmd! - autocmd FocusLost * wall + autocmd focuslost * wall augroup END augroup numbertoggle autocmd! - autocmd BufEnter,FocusGained,InsertLeave * set relativenumber - autocmd BufLeave,FocusLost,InsertEnter * set norelativenumber + autocmd bufenter,focusgained,insertleave * set relativenumber + autocmd bufleave,focuslost,insertenter * set norelativenumber +augroup END + +augroup vimrc + autocmd bufwritepost ~/.vim/gvimrc source % + autocmd bufwritepost ~/.vim/vimrc source % + autocmd bufwritepost ~/.vim/vimrc.local source % augroup END " local -- 2.43.0