Skip to content

Commit 1df99eb

Browse files
committed
fix: clean up vimrc
1 parent 333b934 commit 1df99eb

File tree

3 files changed

+39
-28
lines changed

3 files changed

+39
-28
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [0.7.1] - 2020-06-09
10+
### Fixed
11+
- Cleaned up vimrc.
12+
- Fixed Amethyst bindings.
13+
914
## [0.7.0] - 2020-06-06
1015
### Added
1116
- Replace htop with ytop. You'll have to install ytop. It's been given the alias `top`.
@@ -88,7 +93,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8893
### Added
8994
- Created basic script for proof of concept.
9095

91-
[Unreleased]: https://github.com/adamtabrams/fig/compare/0.7.0...HEAD
96+
[Unreleased]: https://github.com/adamtabrams/fig/compare/0.7.1...HEAD
97+
[0.7.1]: https://github.com/adamtabrams/fig/compare/0.7.0...0.7.1
9298
[0.7.0]: https://github.com/adamtabrams/fig/compare/0.6.1...0.7.0
9399
[0.6.1]: https://github.com/adamtabrams/fig/compare/0.6.0...0.6.1
94100
[0.6.0]: https://github.com/adamtabrams/fig/compare/0.5.0...0.6.0

home/.config/lf/lfrc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ set findlen 0
1010
set previewer ~/.config/lf/preview.sh
1111
set sortby 'ctime'
1212
set reverse
13+
set hiddenfiles ".DS_Store:.git:.gitignore:~/[.ADLMP]*:!~/.config"
1314

1415
### Mappings ###
1516
map <c-g> $lf -remote "send $id cd '$(~/.config/lf/cd-fzf.sh)'"
@@ -21,6 +22,3 @@ map x $$f
2122
map X !$f
2223
map L $lazygit
2324
map D :delete
24-
25-
# custom ignore
26-
set hiddenFiles "**/.DS_Store:**/.git:**/.gitignore:~/[.ADLMP]*:!~/.config"

home/.config/nvim/init.vim

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"##################### PLUG #########################
1+
"### Plug ########################################
22
if ! filereadable(expand('~/.local/share/nvim/site/autoload/plug.vim'))
33
echo "Downloading junegunn/vim-plug to manage plugins..."
44
silent !curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs
@@ -17,16 +17,17 @@ Plug 'tpope/vim-fugitive'
1717
Plug 'tomtom/tcomment_vim'
1818
Plug '/usr/local/opt/fzf'
1919
Plug 'junegunn/fzf.vim'
20-
Plug 'dense-analysis/ale'
2120
Plug 'yggdroot/indentline'
21+
Plug 'easymotion/vim-easymotion'
22+
Plug 'junegunn/goyo.vim'
23+
Plug 'dense-analysis/ale'
2224
Plug 'fatih/vim-go'
23-
Plug 'vimwiki/vimwiki'
2425
Plug 'rust-lang/rust.vim'
2526
Plug 'racer-rust/vim-racer'
26-
Plug 'easymotion/vim-easymotion'
27+
Plug 'vimwiki/vimwiki'
2728
call plug#end()
2829

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

104-
"##################### SETTINGS #####################
105+
"### Settings ####################################
105106
set fileformats=unix,mac,dos
106107
set wildmode=longest,list,full
107108
set clipboard+=unnamedplus
@@ -121,21 +122,23 @@ set nohlsearch
121122
set hidden
122123
set background=dark
123124
set iskeyword+=-
125+
set nojoinspaces
124126
colorscheme solarized
125127
syntax enable
126128

127-
"##################### AUTOCMDS #####################
129+
"### Autocmds ####################################
128130
autocmd TermOpen * setlocal nonu nornu
129131
autocmd TermOpen * IndentLinesDisable
130132
autocmd TermOpen * startinsert
131133
autocmd BufWritePre * %s:\s\+$::e
132-
autocmd BufNewFile,BufRead * setlocal formatoptions -=o
134+
autocmd BufNewFile,BufRead * set formatoptions -=o
133135
autocmd BufNewFile,BufRead Jenkinsfile setlocal filetype=groovy
136+
autocmd BufNewFile,BufRead *.mom setlocal filetype=groff
134137
autocmd FileType yaml,json set tabstop=2 shiftwidth=2
135138
autocmd FileType json IndentLinesDisable
136139
autocmd FileType markdown setlocal spell
137140

138-
"################### FUNCTIONS ######################
141+
"### Functions ##################################
139142
function! ResizeMode()
140143
let key = nr2char(getchar())
141144
while key != "q" && key != "\<ESC>"
@@ -214,19 +217,19 @@ function! AlignWithMark(...)
214217
return ""
215218
endfunction
216219

217-
"################### REMAPPINGS #####################
218-
"--- Hotfix -----------------------------------------
220+
"### Remappings ##################################
221+
"--- Hotfix --------------------------------------
219222
cnoremap 3636 <c-u>undo<CR>
220223
221-
"--- Should-Be-Defaults -----------------------------
224+
"--- Should-Be-Defaults --------------------------
222225
cnoremap w!! execute 'silent! write !sudo tee % >/dev/null' <bar> edit!
223226
nnoremap c "_c
224227
nnoremap Y y$
225228
inoremap <c-v> <c-o>p
226229
tnoremap <c-\> <c-\><c-n>
227230
tmap <c-w> <c-\><c-w>
228231
229-
"--- Functions ---------------------------------------
232+
"--- Functions -----------------------------------
230233
nnoremap <silent> <c-w>r <c-w>t:call ResizeMode()<CR>
231234
nnoremap <silent> <c-w>R :call ResizeMode()<CR>
232235
@@ -240,52 +243,56 @@ inoremap <silent> <s-Tab> <c-r>=OmniTab()<CR>
240243
nnoremap <silent> gA :call AlignWithMark("i")<CR>
241244
vnoremap <silent> gA :call AlignWithMark("s")<CR>
242245
243-
"--- Testing ----------------------------------------
246+
"--- Testing -------------------------------------
244247
nnoremap <silent> gw :w<CR>
245248
nnoremap <silent> gN :tabnext<CR>
246249
nnoremap <silent> gP :tabprevious<CR>
247250
nnoremap <c-d> <c-d>zz
248251
nnoremap <c-u> <c-u>zz
249252
250-
"--- Autocomplete -----------------------------------
253+
"--- Autocomplete --------------------------------
251254
inoremap <c-f> <c-x><c-f>
252255
inoremap <c-l> <c-x><c-l>
253256
inoremap <c-b> <c-x><c-p>
254257
"^ <c-x><c-p> block complete (continue completing where left off)
255258

256-
"--- Splits/Buffers ---------------------------------
259+
"--- Splits/Buffers ------------------------------
257260
nnoremap <silent> gn :bn<CR>
258261
nnoremap <silent> gp :bp<CR>
259262
nnoremap <silent> gbd :bd<CR>
260263
nnoremap <silent> gbD :bd \| sbn<CR>
261264
262-
"--- Coding -----------------------------------------
265+
"--- Writing -------------------------------------
266+
cnoremap Essayon Goyo \| ALEDisableBuffer \| setlocal fo+=a tw=81 nospell
267+
cnoremap Essayoff Goyo! \| ALEEnableBuffer \| setlocal fo-=a tw=0 spell
268+
269+
"--- Coding --------------------------------------
263270
nnoremap goq <c-w>j<c-w>q
264271
nnoremap gs :%s//g<Left><Left>
265272
nnoremap gS :%s/<c-r><c-w>//g<Left><Left>
266273
nnoremap gth :set hlsearch!<CR>
267274
nnoremap gtl :IndentLinesToggle<CR>
268275
269-
"--- SURROUND ----------------------------------------
276+
"--- Surround ------------------------------------
270277
nmap dsf dt(ds(
271278
nmap dsm dt[ds[
272279
nmap dsl dt{ds{
273280
nmap dsv dt<ds<
274281
nmap g' ysiW"
275282
276-
"--- EASY MOTION ------------------------------------
283+
"--- Easy Motion ---------------------------------
277284
nmap gf <Plug>(easymotion-overwin-w)
278285
nmap gF <Plug>(easymotion-bd-wl)
279286
nmap g<c-f> <Plug>(easymotion-jumptoanywhere)
280287
281-
"--- ALE LINTING ------------------------------------
288+
"--- Ale Linting ---------------------------------
282289
nnoremap <silent> gaa :ALEFirst<CR>
283290
nnoremap <silent> gan :ALENextWrap<CR>
284291
nnoremap <silent> gap :ALEPreviousWrap<CR>
285292
nnoremap <silent> gaf :ALEFix<CR>
286293
nnoremap <silent> gad :ALEDetail<CR>
287294
288-
"--- VIM-GO -----------------------------------------
295+
"--- Vim-Go --------------------------------------
289296
autocmd FileType go nnoremap goi :GoInfo<CR>
290297
autocmd FileType go nnoremap got :GoTest<CR>
291298
autocmd FileType go nnoremap goT :GoTestFunc!<CR>
@@ -303,7 +310,7 @@ autocmd FileType go IndentLinesDisable
303310
autocmd FileType go highlight link Whitespace Conceal
304311
autocmd FileType go set list listchars=tab:\|\ "keep trailing space
305312

306-
"--- VIM-RUST ---------------------------------------
313+
"--- Vim-Rust ------------------------------------
307314
augroup Racer
308315
" autocmd!
309316
autocmd FileType rust nmap gd <Plug>(rust-def)
@@ -318,10 +325,10 @@ augroup Racer
318325
autocmd FileType rust nmap gtR :let g:ale_linters['rust'] = g:rustlint2<CR>
319326
augroup END
320327

321-
"--- Leader Key -------------------------------------
328+
"--- Leader Key ----------------------------------
322329
let mapleader = ","
323330

324-
"--- FZF --------------------------------------------
331+
"--- Fzf -----------------------------------------
325332
let maplocalleader = "\<Space>"
326333
nnoremap <LocalLeader><LocalLeader> :Lines<CR>
327334
nnoremap <LocalLeader>f :Files<CR>

0 commit comments

Comments
 (0)