Remove vim configuration
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -10,9 +10,6 @@
|
|||||||
[submodule "pkgbuilds/portfolio-performance-bin"]
|
[submodule "pkgbuilds/portfolio-performance-bin"]
|
||||||
path = pkgbuilds/portfolio-performance-bin
|
path = pkgbuilds/portfolio-performance-bin
|
||||||
url = https://aur.archlinux.org/portfolio-performance-bin.git
|
url = https://aur.archlinux.org/portfolio-performance-bin.git
|
||||||
[submodule "pkgbuilds/vim-plug"]
|
|
||||||
path = pkgbuilds/vim-plug
|
|
||||||
url = https://aur.archlinux.org/vim-plug.git
|
|
||||||
[submodule "pkgbuilds/terraform-ls-bin"]
|
[submodule "pkgbuilds/terraform-ls-bin"]
|
||||||
path = pkgbuilds/terraform-ls-bin
|
path = pkgbuilds/terraform-ls-bin
|
||||||
url = https://aur.archlinux.org/terraform-ls-bin.git
|
url = https://aur.archlinux.org/terraform-ls-bin.git
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
empty_directories:
|
empty_directories:
|
||||||
- name: .config/nvim
|
|
||||||
- name: .config/rofi
|
- name: .config/rofi
|
||||||
- name: .config/gtk-3.0
|
- name: .config/gtk-3.0
|
||||||
- name: .config/gtk-3.0-overrides
|
- name: .config/gtk-3.0-overrides
|
||||||
@@ -47,8 +46,6 @@ dotfiles:
|
|||||||
dir: true
|
dir: true
|
||||||
- from: tmux/tmux.conf
|
- from: tmux/tmux.conf
|
||||||
to: .config/tmux/tmux.conf
|
to: .config/tmux/tmux.conf
|
||||||
- from: vim/vimrc
|
|
||||||
to: .config/nvim/init.vim
|
|
||||||
- from: x/Xresources
|
- from: x/Xresources
|
||||||
to: .config/Xresources
|
to: .config/Xresources
|
||||||
- from: x/xinitrc
|
- from: x/xinitrc
|
||||||
@@ -105,6 +102,7 @@ dotfiles:
|
|||||||
dotfiles_remove:
|
dotfiles_remove:
|
||||||
- .gitconfig
|
- .gitconfig
|
||||||
- .vimrc
|
- .vimrc
|
||||||
|
- .config/nvim/init.vim
|
||||||
- .tmux.conf
|
- .tmux.conf
|
||||||
- .i3
|
- .i3
|
||||||
- .gtkrc-2.0
|
- .gtkrc-2.0
|
||||||
|
|||||||
Submodule pkgbuilds/vim-plug deleted from 6f641d45c8
@@ -248,7 +248,6 @@
|
|||||||
curl -sSf --proto '=https' https://download.spotify.com/debian/pubkey_C85668DF69375001.gpg | gpg --import -
|
curl -sSf --proto '=https' https://download.spotify.com/debian/pubkey_C85668DF69375001.gpg | gpg --import -
|
||||||
|
|
||||||
- name: nodejs-intelephense
|
- name: nodejs-intelephense
|
||||||
- name: vim-plug
|
|
||||||
- name: terraform-ls-bin
|
- name: terraform-ls-bin
|
||||||
- name: grm-git
|
- name: grm-git
|
||||||
- name: screencfg-git
|
- name: screencfg-git
|
||||||
|
|||||||
14
user.yml
14
user.yml
@@ -270,20 +270,6 @@
|
|||||||
owner: "{{ user.name }}"
|
owner: "{{ user.name }}"
|
||||||
group: "{{ user.name }}"
|
group: "{{ user.name }}"
|
||||||
|
|
||||||
- name: Vim
|
|
||||||
tags:
|
|
||||||
- user:vim
|
|
||||||
block:
|
|
||||||
- name: Install vim plugins
|
|
||||||
ansible.builtin.command: nvim --headless +PlugInstall +qall
|
|
||||||
register: vim_plugin_install
|
|
||||||
changed_when: vim_plugin_install.stderr != ""
|
|
||||||
|
|
||||||
- name: Update vim plugins
|
|
||||||
ansible.builtin.command: nvim --headless +PlugUpdate +qall
|
|
||||||
register: vim_plugin_update
|
|
||||||
changed_when: vim_plugin_update.stderr != ""
|
|
||||||
|
|
||||||
- name: Firefox
|
- name: Firefox
|
||||||
tags:
|
tags:
|
||||||
- user:firefox
|
- user:firefox
|
||||||
|
|||||||
318
vim/vimrc
318
vim/vimrc
@@ -1,318 +0,0 @@
|
|||||||
set nocompatible
|
|
||||||
filetype off
|
|
||||||
call plug#begin('~/.local/share/nvim/plugged')
|
|
||||||
|
|
||||||
" === plugins ===
|
|
||||||
|
|
||||||
function! Cond(Cond, ...)
|
|
||||||
let opts = get(a:000, 0, {})
|
|
||||||
return a:Cond ? opts : extend(opts, { 'on': [], 'for': [] })
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" editing plugins
|
|
||||||
Plug 'godlygeek/tabular', Cond(!exists('g:vscode'))
|
|
||||||
Plug 'nathanaelkane/vim-indent-guides', Cond(!exists('g:vscode'))
|
|
||||||
Plug 'tpope/vim-commentary', Cond(!exists('g:vscode'))
|
|
||||||
Plug 'airblade/vim-gitgutter', Cond(!exists('g:vscode'))
|
|
||||||
|
|
||||||
" ui
|
|
||||||
Plug 'sickill/vim-monokai', Cond(!exists('g:vscode'))
|
|
||||||
Plug 'itchyny/lightline.vim', Cond(!exists('g:vscode'))
|
|
||||||
|
|
||||||
" lang integrations
|
|
||||||
Plug 'lepture/vim-jinja', Cond(!exists('g:vscode'))
|
|
||||||
Plug 'fatih/vim-go', Cond(!exists('g:vscode'))
|
|
||||||
Plug 'hashivim/vim-terraform', Cond(!exists('g:vscode'))
|
|
||||||
Plug 'editorconfig/editorconfig-vim', Cond(!exists('g:vscode'))
|
|
||||||
Plug 'rust-lang/rust.vim', Cond(!exists('g:vscode'))
|
|
||||||
Plug 'rodjek/vim-puppet', Cond(!exists('g:vscode'))
|
|
||||||
|
|
||||||
" helpers
|
|
||||||
"" distraction free writing
|
|
||||||
Plug 'junegunn/limelight.vim', Cond(!exists('g:vscode'))
|
|
||||||
Plug 'junegunn/goyo.vim', Cond(!exists('g:vscode'))
|
|
||||||
Plug 'reedes/vim-pencil', Cond(!exists('g:vscode'))
|
|
||||||
|
|
||||||
"" markdown
|
|
||||||
Plug 'suan/vim-instant-markdown', Cond(!exists('g:vscode'))
|
|
||||||
|
|
||||||
Plug 'dense-analysis/ale', Cond(!exists('g:vscode'))
|
|
||||||
|
|
||||||
Plug 'neoclide/coc.nvim', Cond(!exists('g:vscode'), {'branch': 'release'})
|
|
||||||
|
|
||||||
|
|
||||||
call plug#end()
|
|
||||||
filetype plugin indent on
|
|
||||||
|
|
||||||
" == formatting ==
|
|
||||||
set tabstop=4
|
|
||||||
set smarttab
|
|
||||||
set softtabstop=4
|
|
||||||
set shiftround
|
|
||||||
set shiftwidth=4
|
|
||||||
set autoindent
|
|
||||||
set expandtab
|
|
||||||
set smartindent
|
|
||||||
set formatoptions=tcqjron
|
|
||||||
"set formatoptions=
|
|
||||||
|
|
||||||
" == ui ==
|
|
||||||
set cursorline
|
|
||||||
set showcmd
|
|
||||||
set number
|
|
||||||
set wildmode=list:longest
|
|
||||||
set lazyredraw
|
|
||||||
set wildmenu
|
|
||||||
set noshowmatch
|
|
||||||
set colorcolumn=80
|
|
||||||
set laststatus=2
|
|
||||||
set matchtime=5
|
|
||||||
set mouse=a
|
|
||||||
set mousehide
|
|
||||||
set noerrorbells
|
|
||||||
set noshowmode
|
|
||||||
set numberwidth=2
|
|
||||||
set relativenumber
|
|
||||||
set shortmess=rtiF
|
|
||||||
set ruler
|
|
||||||
set scrolloff=7
|
|
||||||
set title
|
|
||||||
set titlestring=""
|
|
||||||
set ttyfast
|
|
||||||
|
|
||||||
" == searching ==
|
|
||||||
set hlsearch
|
|
||||||
set incsearch
|
|
||||||
set gdefault
|
|
||||||
set ignorecase
|
|
||||||
set magic
|
|
||||||
set smartcase
|
|
||||||
|
|
||||||
" == folding ==
|
|
||||||
set foldenable
|
|
||||||
set foldmethod=indent
|
|
||||||
set foldnestmax=2
|
|
||||||
set foldlevelstart=2
|
|
||||||
|
|
||||||
" == backups ==
|
|
||||||
set nobackup
|
|
||||||
set backupcopy=no
|
|
||||||
set nowritebackup
|
|
||||||
|
|
||||||
" == swap ==
|
|
||||||
set swapfile
|
|
||||||
set updatecount=200
|
|
||||||
set updatetime=300
|
|
||||||
|
|
||||||
" == undo ==
|
|
||||||
set undolevels=1000
|
|
||||||
set undoreload=10000
|
|
||||||
set undodir=~/.vim/undo
|
|
||||||
set undofile
|
|
||||||
|
|
||||||
" == environment / directories ==
|
|
||||||
set autochdir
|
|
||||||
set directory=/var/tmp,/tmp
|
|
||||||
set viewdir=~/.vim/view
|
|
||||||
|
|
||||||
" == misc ==
|
|
||||||
set autoread
|
|
||||||
set confirm
|
|
||||||
set encoding=utf-8
|
|
||||||
set history=1000
|
|
||||||
set modeline
|
|
||||||
set modelines=5
|
|
||||||
set notildeop
|
|
||||||
set wildignore=*.swp,*.bak,*.pyc,*~,*.o
|
|
||||||
set hidden
|
|
||||||
|
|
||||||
" == editing ==
|
|
||||||
set backspace=indent,eol,start
|
|
||||||
" set esckeys
|
|
||||||
set matchpairs=(:),{:},[:],<:>
|
|
||||||
set notimeout
|
|
||||||
set ttimeout
|
|
||||||
set timeoutlen=1000
|
|
||||||
set ttimeoutlen=0
|
|
||||||
set virtualedit=block
|
|
||||||
set whichwrap=b,s
|
|
||||||
|
|
||||||
" == line breaking ==
|
|
||||||
set linebreak
|
|
||||||
set wrap
|
|
||||||
set wrapscan
|
|
||||||
|
|
||||||
" == to use guicolors in terminal ==
|
|
||||||
set termguicolors
|
|
||||||
|
|
||||||
" === keybinds ===
|
|
||||||
set signcolumn=yes
|
|
||||||
|
|
||||||
let maplocalleader = "ö"
|
|
||||||
let mapleader = "\<Space>"
|
|
||||||
" map <leader>w: w!<cr>
|
|
||||||
|
|
||||||
" nnoremap <leader>w :w<CR>
|
|
||||||
nmap <leader><leader> za
|
|
||||||
map , :
|
|
||||||
|
|
||||||
vnoremap <silent> y y`]
|
|
||||||
vnoremap <silent> p p`]
|
|
||||||
nnoremap <silent> p p`]
|
|
||||||
|
|
||||||
nnoremap <leader>, :nohlsearch<CR>
|
|
||||||
|
|
||||||
noremap gV `[v`]
|
|
||||||
|
|
||||||
map Y y$
|
|
||||||
map j gj
|
|
||||||
map k gk
|
|
||||||
|
|
||||||
|
|
||||||
map N Nzz
|
|
||||||
map n nzz
|
|
||||||
|
|
||||||
inoremap jj <ESC>
|
|
||||||
|
|
||||||
" no more ex mode
|
|
||||||
nnoremap Q <nop>
|
|
||||||
|
|
||||||
" Use // in visual mode to search for selection
|
|
||||||
" https://vim.fandom.com/wiki/Search_for_visually_selected_text
|
|
||||||
vnoremap // y/\V<C-R>=escape(@",'/\')<CR><CR>
|
|
||||||
|
|
||||||
if exists('g:vscode')
|
|
||||||
xmap gc <Plug>VSCodeCommentary
|
|
||||||
nmap gc <Plug>VSCodeCommentary
|
|
||||||
omap gc <Plug>VSCodeCommentary
|
|
||||||
nmap gcc <Plug>VSCodeCommentaryLine
|
|
||||||
else
|
|
||||||
nnoremap <C-h> <C-w>h
|
|
||||||
nnoremap <C-j> <C-w>j
|
|
||||||
nnoremap <C-k> <C-w>k
|
|
||||||
nnoremap <C-l> <C-w>l
|
|
||||||
|
|
||||||
nmap <C-n> :bnext<CR>
|
|
||||||
nmap <C-p> :bprev<CR>
|
|
||||||
|
|
||||||
nnoremap <leader>m :InstantMarkdownPreview<CR>
|
|
||||||
|
|
||||||
nnoremap <leader>u :GundoToggle<CR>
|
|
||||||
nnoremap <leader>d :diffupdate<CR>
|
|
||||||
|
|
||||||
nmap <F9> :Goyo<CR>:TogglePencil<CR>
|
|
||||||
nmap <leader>w :Goyo<CR>:TogglePencil<CR>:set colorcolumn=<CR>
|
|
||||||
|
|
||||||
nmap <leader>c :%w !xclip -selection clipboard<CR>
|
|
||||||
nmap <leader>x :r !xclip -out -selection -clipboard<CR><CR>
|
|
||||||
|
|
||||||
nmap <leader>f :Autoformat<CR>
|
|
||||||
|
|
||||||
nnoremap <leader>v <C-w>v<C-w>l
|
|
||||||
|
|
||||||
syntax enable
|
|
||||||
silent! colorscheme monokai
|
|
||||||
|
|
||||||
highlight Comment guifg=#64d86b
|
|
||||||
highlight SpecialComment guifg=#64d86b
|
|
||||||
highlight Todo guibg=#a9ebad
|
|
||||||
|
|
||||||
let g:lightline = {
|
|
||||||
\ 'colorscheme': 'wombat',
|
|
||||||
\ 'active': {
|
|
||||||
\ 'left': [ [ 'mode', 'paste' ],
|
|
||||||
\ [ 'readonly', 'filename', 'modified', 'helloworld' ] ],
|
|
||||||
\ 'right': [ [ 'gitbranch' ],
|
|
||||||
\ [ 'lineinfo' ],
|
|
||||||
\ [ 'percent' ],
|
|
||||||
\ [ 'fileformat', 'fileencoding', 'filetype', 'charvaluehex' ],
|
|
||||||
\ [ 'directory' ] ],
|
|
||||||
\ },
|
|
||||||
\ 'component_function': {
|
|
||||||
\ 'gitbranch': 'fugitive#head',
|
|
||||||
\ 'directory': 'LightLineFilename',
|
|
||||||
\ },
|
|
||||||
\ 'component': {
|
|
||||||
\ },
|
|
||||||
\ }
|
|
||||||
|
|
||||||
|
|
||||||
function! LightLineFilename()
|
|
||||||
return fnamemodify(expand('%F'), ":~:h")
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" == pencil ==
|
|
||||||
let g:pencil#textwidth = 80
|
|
||||||
let g:pencil#autoformat = 1
|
|
||||||
let g:pencil#wrapModeDefault = 'hard'
|
|
||||||
let g:pencil#map#suspend_af = 'K'
|
|
||||||
|
|
||||||
" == goyo ==
|
|
||||||
let g:goyo_width = 100
|
|
||||||
let g:goyo_height = "90%"
|
|
||||||
let g:goyo_linenr = 0
|
|
||||||
|
|
||||||
autocmd! User GoyoEnter Limelight
|
|
||||||
autocmd! User GoyoLeave Limelight!
|
|
||||||
|
|
||||||
" == limelight ==
|
|
||||||
let g:limelight_default_coefficient = 0.5
|
|
||||||
|
|
||||||
let g:ale_linters = {'rust': ['rust-analyzer']}
|
|
||||||
|
|
||||||
" === functions ===
|
|
||||||
function! DeleteTrailingWS()
|
|
||||||
exe "normal mz"
|
|
||||||
%s/\s\+$//e
|
|
||||||
exe "normal `z"
|
|
||||||
endfunction
|
|
||||||
autocmd BufWritePre * :call DeleteTrailingWS()
|
|
||||||
|
|
||||||
autocmd FileType yaml set shiftwidth=2
|
|
||||||
autocmd FileType toml set shiftwidth=2
|
|
||||||
autocmd FileType html setl shiftwidth=2
|
|
||||||
|
|
||||||
let g:instant_markdown_autostart = 0
|
|
||||||
|
|
||||||
let g:terraform_align = 1
|
|
||||||
let g:terraform_fmt_on_save=1
|
|
||||||
|
|
||||||
let g:rustfmt_autosave = 1
|
|
||||||
|
|
||||||
inoremap <silent><expr> <TAB>
|
|
||||||
\ coc#pum#visible() ? coc#pum#next(1) :
|
|
||||||
\ CheckBackspace() ? "\<Tab>" :
|
|
||||||
\ coc#refresh()
|
|
||||||
inoremap <expr><S-TAB> coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"
|
|
||||||
|
|
||||||
" Make <CR> to accept selected completion item or notify coc.nvim to format
|
|
||||||
" <C-g>u breaks current undo, please make your own choice.
|
|
||||||
inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm()
|
|
||||||
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
|
|
||||||
|
|
||||||
function! CheckBackspace() abort
|
|
||||||
let col = col('.') - 1
|
|
||||||
return !col || getline('.')[col - 1] =~# '\s'
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" Use <c-space> to trigger completion.
|
|
||||||
if has('nvim')
|
|
||||||
inoremap <silent><expr> <c-space> coc#refresh()
|
|
||||||
else
|
|
||||||
inoremap <silent><expr> <c-@> coc#refresh()
|
|
||||||
endif
|
|
||||||
|
|
||||||
if has('nvim')
|
|
||||||
inoremap <silent><expr> <c-space> coc#refresh()
|
|
||||||
else
|
|
||||||
inoremap <silent><expr> <c-@> coc#refresh()
|
|
||||||
endif
|
|
||||||
|
|
||||||
" https://stackoverflow.com/a/8585343
|
|
||||||
map <leader>q :bp<bar>sp<bar>bn<bar>bd<CR>
|
|
||||||
|
|
||||||
nmap <silent> gd <Plug>(coc-definition)
|
|
||||||
nmap <silent> gy <Plug>(coc-type-definition)
|
|
||||||
nmap <silent> gi <Plug>(coc-implementation)
|
|
||||||
nmap <silent> gr <Plug>(coc-references)
|
|
||||||
endif
|
|
||||||
Reference in New Issue
Block a user