From 9e2b2d0b1168d7cb35cc87299ecbe85dbb34f3af Mon Sep 17 00:00:00 2001 From: Julian T Date: Wed, 18 Aug 2021 18:11:21 +0200 Subject: Move to normal vim and several config changes --- config.yaml | 1 + vim-core/.config/nvim/init.vim | 65 ++++++++++++++++++---------------------- vim-core/.vim/vimrc | 1 + vim-extra/.config/nvim/extra.vim | 10 +++---- vim-extra/.vim/extra.vim | 1 + zsh/.zshrc | 1 + 6 files changed, 38 insertions(+), 41 deletions(-) create mode 120000 vim-core/.vim/vimrc create mode 120000 vim-extra/.vim/extra.vim diff --git a/config.yaml b/config.yaml index 5c65f31..c10c640 100644 --- a/config.yaml +++ b/config.yaml @@ -3,4 +3,5 @@ do_not_link: - . # This is shared by the two vim packages - .config/nvim + - .vim - Scripts diff --git a/vim-core/.config/nvim/init.vim b/vim-core/.config/nvim/init.vim index 9dc64d5..0753756 100644 --- a/vim-core/.config/nvim/init.vim +++ b/vim-core/.config/nvim/init.vim @@ -1,18 +1,25 @@ -set nocompatible " be iMproved, required +set nocompatible filetype plugin on set shellslash runtime extra.vim filetype plugin indent on " required -" General vim settings +" General vim settings{{{ syntax enable set number set relativenumber + set cul + " More sensible splitting set splitbelow splitright + set backspace=start,eol + + " Do not create the tilde files + set nobackup + set tabstop=4 set shiftwidth=4 set expandtab @@ -52,38 +59,28 @@ filetype plugin indent on " required set autoread " Exit insert mode on inactivity - " au CursorHoldI * stopinsert + " au CursorHoldI * stopinsert}}} -" Language specific +" Cursor{{{ + augroup cursorgroup + autocmd InsertEnter * set nocul + autocmd InsertLeave * set cul + augroup end"}}} + +" Language specific{{{ autocmd FileType python set et + autocmd FileType go setlocal noet + autocmd FileType nix setlocal shiftwidth=4 + autocmd FileType vim setlocal foldmethod=marker"}}} -" Latex stuff - let g:tex_flavor='latex' - - let g:vimtex_quickfix_blgparser = {'disable': 1} - let g:vimtex_quickfix_open_on_warning = 0 - let g:vimtex_compiler_latexmk = { - \ 'backend' : 'nvim', - \ 'background' : 0, - \ 'build_dir' : '', - \ 'callback' : 1, - \ 'continuous' : 0, - \ 'executable' : 'latexmk', - \ 'hooks' : [], - \ 'options' : [ - \ '-file-line-error', - \ '-synctex=1', - \ ], - \} - -" File management +" File management{{{ " Fuzzy like menu set path+=** set wildmenu - let g:netrw_liststyle=2 + let g:netrw_liststyle=2"}}} -" Keymapping +" Keymapping{{{ " Tab for cycling the completion meny, in insert mode inoremap pumvisible() ? "\" : "\" @@ -96,23 +93,19 @@ filetype plugin indent on " required let mapleader=" " map mm :make V=1 - map mf :make flash V=1 - -" Style enforcement - autocmd FileType go setlocal noet - autocmd FileType nix setlocal shiftwidth=4 + map mf :make flash V=1"}}} -" Enforcing filetypes +" Enforcing filetypes{{{ autocmd BufRead,BufNewFile *.ino set filetype=c autocmd BufRead,BufNewFile *.asc set filetype=asciidoc autocmd BufRead,BufNewFile *.nix set filetype=nix - autocmd BufRead,BufNewFile *.tsx set filetype=typescript + autocmd BufRead,BufNewFile *.tsx set filetype=typescript"}}} -" Highlightning And colors +" Highlightning And colors{{{ set termguicolors " Spell check - set spelllang=en - " autocmd FileType mail,tex,markdown,rst set spell + set spelllang=en,da + " autocmd FileType mail,tex,markdown,rst set spell}}} diff --git a/vim-core/.vim/vimrc b/vim-core/.vim/vimrc new file mode 120000 index 0000000..734c056 --- /dev/null +++ b/vim-core/.vim/vimrc @@ -0,0 +1 @@ +../.config/nvim/init.vim \ No newline at end of file diff --git a/vim-extra/.config/nvim/extra.vim b/vim-extra/.config/nvim/extra.vim index d508018..4ff2c93 100644 --- a/vim-extra/.config/nvim/extra.vim +++ b/vim-extra/.config/nvim/extra.vim @@ -1,4 +1,4 @@ -" Plugins +" Plugins{{{ " set the runtime path to include Vundle and initialize set rtp+=~/.config/nvim/bundle/Vundle.vim call vundle#begin("~/.config/nvim/bundle") @@ -38,7 +38,7 @@ Plugin 'tpope/vim-fugitive' " File support - " Plugin 'cespare/vim-toml' + Plugin 'cespare/vim-toml' Plugin 'lervag/vimtex' " Plugin 'aklt/plantuml-syntax' Plugin 'LnL7/vim-nix' @@ -54,9 +54,9 @@ " Plugin 'SirVer/ultisnips' " Plugin 'honza/vim-snippets' - call vundle#end() " required + call vundle#end() " required}}} -" Completion +" Completion{{{ set completeopt+=menuone set completeopt+=noselect @@ -106,4 +106,4 @@ " \ 'takeover': 'never', " \ }, " \ } - " \ } + " \ }}}} diff --git a/vim-extra/.vim/extra.vim b/vim-extra/.vim/extra.vim new file mode 120000 index 0000000..3e61a92 --- /dev/null +++ b/vim-extra/.vim/extra.vim @@ -0,0 +1 @@ +../.config/nvim/extra.vim \ No newline at end of file diff --git a/zsh/.zshrc b/zsh/.zshrc index a62efd5..6c7ad0a 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -114,6 +114,7 @@ alias vim="$EDITOR" alias ls='ls --color=auto' alias python="python3" alias ipy="ipython" +alias nvim="echo no" # # Functions -- cgit v1.2.3