Skip to content

Commit

Permalink
fix: clean up vimrc
Browse files Browse the repository at this point in the history
  • Loading branch information
adamtabrams committed Jun 9, 2020
1 parent 333b934 commit 1df99eb
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 28 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.7.1] - 2020-06-09
### Fixed
- Cleaned up vimrc.
- Fixed Amethyst bindings.

## [0.7.0] - 2020-06-06
### Added
- Replace htop with ytop. You'll have to install ytop. It's been given the alias `top`.
Expand Down Expand Up @@ -88,7 +93,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Created basic script for proof of concept.

[Unreleased]: https://github.com/adamtabrams/fig/compare/0.7.0...HEAD
[Unreleased]: https://github.com/adamtabrams/fig/compare/0.7.1...HEAD
[0.7.1]: https://github.com/adamtabrams/fig/compare/0.7.0...0.7.1
[0.7.0]: https://github.com/adamtabrams/fig/compare/0.6.1...0.7.0
[0.6.1]: https://github.com/adamtabrams/fig/compare/0.6.0...0.6.1
[0.6.0]: https://github.com/adamtabrams/fig/compare/0.5.0...0.6.0
Expand Down
4 changes: 1 addition & 3 deletions home/.config/lf/lfrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ set findlen 0
set previewer ~/.config/lf/preview.sh
set sortby 'ctime'
set reverse
set hiddenfiles ".DS_Store:.git:.gitignore:~/[.ADLMP]*:!~/.config"

### Mappings ###
map <c-g> $lf -remote "send $id cd '$(~/.config/lf/cd-fzf.sh)'"
Expand All @@ -21,6 +22,3 @@ map x $$f
map X !$f
map L $lazygit
map D :delete

# custom ignore
set hiddenFiles "**/.DS_Store:**/.git:**/.gitignore:~/[.ADLMP]*:!~/.config"
55 changes: 31 additions & 24 deletions home/.config/nvim/init.vim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"##################### PLUG #########################
"### Plug ########################################
if ! filereadable(expand('~/.local/share/nvim/site/autoload/plug.vim'))
echo "Downloading junegunn/vim-plug to manage plugins..."
silent !curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs
Expand All @@ -17,16 +17,17 @@ Plug 'tpope/vim-fugitive'
Plug 'tomtom/tcomment_vim'
Plug '/usr/local/opt/fzf'
Plug 'junegunn/fzf.vim'
Plug 'dense-analysis/ale'
Plug 'yggdroot/indentline'
Plug 'easymotion/vim-easymotion'
Plug 'junegunn/goyo.vim'
Plug 'dense-analysis/ale'
Plug 'fatih/vim-go'
Plug 'vimwiki/vimwiki'
Plug 'rust-lang/rust.vim'
Plug 'racer-rust/vim-racer'
Plug 'easymotion/vim-easymotion'
Plug 'vimwiki/vimwiki'
call plug#end()

"##################### PLUGINS ######################
"### Plugins #####################################
let g:fzf_layout = { 'down': '~70%' }
command! -bang -nargs=? -complete=dir Files
\ call fzf#vim#files(<q-args>, fzf#vim#with_preview(), <bang>0)
Expand Down Expand Up @@ -101,7 +102,7 @@ let g:indentLine_char = '│'
let g:racer_insert_paren = 1
let g:racer_experimental_completer = 1

"##################### SETTINGS #####################
"### Settings ####################################
set fileformats=unix,mac,dos
set wildmode=longest,list,full
set clipboard+=unnamedplus
Expand All @@ -121,21 +122,23 @@ set nohlsearch
set hidden
set background=dark
set iskeyword+=-
set nojoinspaces
colorscheme solarized
syntax enable

"##################### AUTOCMDS #####################
"### Autocmds ####################################
autocmd TermOpen * setlocal nonu nornu
autocmd TermOpen * IndentLinesDisable
autocmd TermOpen * startinsert
autocmd BufWritePre * %s:\s\+$::e
autocmd BufNewFile,BufRead * setlocal formatoptions -=o
autocmd BufNewFile,BufRead * set formatoptions -=o
autocmd BufNewFile,BufRead Jenkinsfile setlocal filetype=groovy
autocmd BufNewFile,BufRead *.mom setlocal filetype=groff
autocmd FileType yaml,json set tabstop=2 shiftwidth=2
autocmd FileType json IndentLinesDisable
autocmd FileType markdown setlocal spell

"################### FUNCTIONS ######################
"### Functions ##################################
function! ResizeMode()
let key = nr2char(getchar())
while key != "q" && key != "\<ESC>"
Expand Down Expand Up @@ -214,19 +217,19 @@ function! AlignWithMark(...)
return ""
endfunction

"################### REMAPPINGS #####################
"--- Hotfix -----------------------------------------
"### Remappings ##################################
"--- Hotfix --------------------------------------
cnoremap 3636 <c-u>undo<CR>
"--- Should-Be-Defaults -----------------------------
"--- Should-Be-Defaults --------------------------
cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' <bar> edit!
nnoremap c "_c
nnoremap Y y$
inoremap <c-v> <c-o>p
tnoremap <c-\> <c-\><c-n>
tmap <c-w> <c-\><c-w>
"--- Functions ---------------------------------------
"--- Functions -----------------------------------
nnoremap <silent> <c-w>r <c-w>t:call ResizeMode()<CR>
nnoremap <silent> <c-w>R :call ResizeMode()<CR>
Expand All @@ -240,52 +243,56 @@ inoremap <silent> <s-Tab> <c-r>=OmniTab()<CR>
nnoremap <silent> gA :call AlignWithMark("i")<CR>
vnoremap <silent> gA :call AlignWithMark("s")<CR>
"--- Testing ----------------------------------------
"--- Testing -------------------------------------
nnoremap <silent> gw :w<CR>
nnoremap <silent> gN :tabnext<CR>
nnoremap <silent> gP :tabprevious<CR>
nnoremap <c-d> <c-d>zz
nnoremap <c-u> <c-u>zz
"--- Autocomplete -----------------------------------
"--- Autocomplete --------------------------------
inoremap <c-f> <c-x><c-f>
inoremap <c-l> <c-x><c-l>
inoremap <c-b> <c-x><c-p>
"^ <c-x><c-p> block complete (continue completing where left off)

"--- Splits/Buffers ---------------------------------
"--- Splits/Buffers ------------------------------
nnoremap <silent> gn :bn<CR>
nnoremap <silent> gp :bp<CR>
nnoremap <silent> gbd :bd<CR>
nnoremap <silent> gbD :bd \| sbn<CR>
"--- Coding -----------------------------------------
"--- Writing -------------------------------------
cnoremap Essayon Goyo \| ALEDisableBuffer \| setlocal fo+=a tw=81 nospell
cnoremap Essayoff Goyo! \| ALEEnableBuffer \| setlocal fo-=a tw=0 spell
"--- Coding --------------------------------------
nnoremap goq <c-w>j<c-w>q
nnoremap gs :%s//g<Left><Left>
nnoremap gS :%s/<c-r><c-w>//g<Left><Left>
nnoremap gth :set hlsearch!<CR>
nnoremap gtl :IndentLinesToggle<CR>
"--- SURROUND ----------------------------------------
"--- Surround ------------------------------------
nmap dsf dt(ds(
nmap dsm dt[ds[
nmap dsl dt{ds{
nmap dsv dt<ds<
nmap g' ysiW"
"--- EASY MOTION ------------------------------------
"--- Easy Motion ---------------------------------
nmap gf <Plug>(easymotion-overwin-w)
nmap gF <Plug>(easymotion-bd-wl)
nmap g<c-f> <Plug>(easymotion-jumptoanywhere)
"--- ALE LINTING ------------------------------------
"--- Ale Linting ---------------------------------
nnoremap <silent> gaa :ALEFirst<CR>
nnoremap <silent> gan :ALENextWrap<CR>
nnoremap <silent> gap :ALEPreviousWrap<CR>
nnoremap <silent> gaf :ALEFix<CR>
nnoremap <silent> gad :ALEDetail<CR>
"--- VIM-GO -----------------------------------------
"--- Vim-Go --------------------------------------
autocmd FileType go nnoremap goi :GoInfo<CR>
autocmd FileType go nnoremap got :GoTest<CR>
autocmd FileType go nnoremap goT :GoTestFunc!<CR>
Expand All @@ -303,7 +310,7 @@ autocmd FileType go IndentLinesDisable
autocmd FileType go highlight link Whitespace Conceal
autocmd FileType go set list listchars=tab:\|\ "keep trailing space

"--- VIM-RUST ---------------------------------------
"--- Vim-Rust ------------------------------------
augroup Racer
" autocmd!
autocmd FileType rust nmap gd <Plug>(rust-def)
Expand All @@ -318,10 +325,10 @@ augroup Racer
autocmd FileType rust nmap gtR :let g:ale_linters['rust'] = g:rustlint2<CR>
augroup END

"--- Leader Key -------------------------------------
"--- Leader Key ----------------------------------
let mapleader = ","

"--- FZF --------------------------------------------
"--- Fzf -----------------------------------------
let maplocalleader = "\<Space>"
nnoremap <LocalLeader><LocalLeader> :Lines<CR>
nnoremap <LocalLeader>f :Files<CR>
Expand Down

0 comments on commit 1df99eb

Please sign in to comment.