some vim setup

This commit is contained in:
Noah Masur 2020-07-31 00:02:41 -04:00
parent 3949f763f4
commit 26fb22f1b5
5 changed files with 2729 additions and 8 deletions

2
.gitignore vendored
View File

@ -1,6 +1,8 @@
.DS_Store .DS_Store
nvim.configlink/dirs/* nvim.configlink/dirs/*
nvim.configlink/.netrwhist nvim.configlink/.netrwhist
nvim.configlink/plugged/**
spacemacs.d.symlink/.spacemacs.env spacemacs.d.symlink/.spacemacs.env
fish.configlink/config.fish.bac fish.configlink/config.fish.bac
*.lock.json *.lock.json

View File

@ -7,7 +7,7 @@ if status --is-interactive
set DOTS (dirname $FISH_DIR) set DOTS (dirname $FISH_DIR)
set PROJ (dirname $DOTS) set PROJ (dirname $DOTS)
set PATH $PATH /usr/local/bin ~/.local/bin $DOTS/bin ~/.cargo/bin set PATH $PATH /usr/local/bin ~/.local/bin $DOTS/bin ~/.cargo/bin
set CDPATH . $HOME $PROJ $DOTS set CDPATH . $HOME $PROJ
# Use `vi` in the shell with cursor shapes # Use `vi` in the shell with cursor shapes
fish_vi_key_bindings fish_vi_key_bindings

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,17 @@
" Vim Config " Vim Config
" Plugins
call plug#begin('~/.config/nvim/plugged')
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } " Required for fuzzyfinder
Plug 'junegunn/fzf.vim' " Actual fuzzyfinder
Plug 'hashivim/vim-terraform' " Terraform HCL syntax
Plug 'vimwiki/vimwiki' " Wiki System
call plug#end()
" Settings
filetype plugin on " Load the plugin for current filetype (vimwiki)
syntax enable " Syntax highlighting syntax enable " Syntax highlighting
set termguicolors " Set to truecolor set termguicolors " Set to truecolor
colorscheme gruvbox " Installed in autoload/ and colors/ colorscheme gruvbox " Installed in autoload/ and colors/
@ -13,7 +25,9 @@ set ignorecase " Ignore case when searching
set smartcase " Check case when using capitals in search set smartcase " Check case when using capitals in search
set incsearch " Search while typing set incsearch " Search while typing
set pastetoggle=<F3> set pastetoggle=<F3>
set visualbell set visualbell " No sounds
set scrolljump=1 " Scroll more than one line (or 1 line)
set scrolloff=3 " Margin of lines when scrolling
set clipboard+=unnamedplus " Uses system clipboard for yanking set clipboard+=unnamedplus " Uses system clipboard for yanking
@ -22,10 +36,6 @@ if has("autocmd")
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g`\"" | endif au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g`\"" | endif
endif endif
" Terraform plugin
let g:terraform_align=1
let g:terraform_remap_spacebar=1
" Line type " Line type
let &t_ti.="\e[1 q" let &t_ti.="\e[1 q"
let &t_SI.="\e[5 q" let &t_SI.="\e[5 q"
@ -36,8 +46,8 @@ let &t_te.="\e[0 q"
set noswapfile " Instead of swaps, create backups (less annoying) set noswapfile " Instead of swaps, create backups (less annoying)
set backup " Easier to recover and more secure set backup " Easier to recover and more secure
set undofile " Keeps undos after quit set undofile " Keeps undos after quit
set backupdir=~/.vim/dirs/backup set backupdir=~/.config/nvim/dirs/backup
set undodir=~/.vim/dirs/undo set undodir=~/.config/vim/dirs/undo
" Create backup directories if they don't exist " Create backup directories if they don't exist
if !isdirectory(&backupdir) if !isdirectory(&backupdir)
@ -54,3 +64,10 @@ set mouse=nv
let &titlestring = @% let &titlestring = @%
set title set title
" Terraform Plugin
let g:terraform_fmt_on_save=1
" VimWiki Plugin
let g:vimwiki_list = [{'path': '~/Documents/notes/',
\ 'syntax': 'markdown', 'ext': '.md'}]

View File

@ -14,6 +14,9 @@ bind j select-pane -D
bind k select-pane -U bind k select-pane -U
bind l select-pane -R bind l select-pane -R
# Split out pane
bind b break-pane
# Copy mode works as Vim # Copy mode works as Vim
bind Escape copy-mode bind Escape copy-mode
bind C-[ copy-mode bind C-[ copy-mode