Skip to content

Commit 9f92390

Browse files
committed
Update bunch of stuff based on m1 mac
1 parent 7d096c9 commit 9f92390

10 files changed

+955
-758
lines changed

.tool-versions

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ruby 3.0.2

.vimrc

+93-140
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,64 @@
1-
" Cobbled together from various sources, including the spf-13 .vimrc
2-
31
set nocompatible " Must be first line
42

5-
" Set up Vundle
6-
filetype on
7-
filetype off
8-
set rtp+=~/.vim/bundle/Vundle.vim
9-
call vundle#begin()
10-
11-
Plugin 'flazz/vim-colorschemes'
12-
Plugin 'tpope/vim-fugitive'
13-
Plugin 'Lokaltog/vim-easymotion'
14-
Plugin 'mileszs/ack.vim'
15-
Plugin 'ctrlpvim/ctrlp.vim'
16-
Plugin 'FelikZ/ctrlp-py-matcher'
3+
" Force python3
4+
if has('python3')
5+
endif
6+
7+
" vim-plug
8+
call plug#begin('~/.vim/plugged')
9+
10+
Plug 'flazz/vim-colorschemes'
11+
Plug 'mbbill/undotree'
12+
Plug 'ervandew/supertab'
13+
14+
Plug 'ctrlpvim/ctrlp.vim'
15+
Plug 'raghur/fruzzy', {'do': { -> fruzzy#install()}}
16+
17+
18+
Plug 'vim-airline/vim-airline'
19+
Plug 'vim-airline/vim-airline-themes'
20+
21+
" Initialize plugin system
22+
call plug#end()
23+
24+
"Plugin 'tpope/vim-fugitive'
25+
"Plugin 'Lokaltog/vim-easymotion'
26+
"Plugin 'mileszs/ack.vim'
1727
"Plugin 'Valloric/YouCompleteMe'
18-
Plugin 'ervandew/supertab.git'
19-
Plugin 'davidhalter/jedi-vim.git'
28+
"Plugin 'davidhalter/jedi-vim.git'
2029

21-
Plugin 'skammer/vim-css-color'
30+
"Plugin 'skammer/vim-css-color'
2231

2332
" TODO potentially remove
24-
Plugin 'terryma/vim-multiple-cursors'
33+
"Plugin 'terryma/vim-multiple-cursors'
2534

2635
"Plugin 'Lokaltog/powerline', {'rtp':'/powerline/bindings/vim'}
27-
Plugin 'vim-airline/vim-airline'
28-
Plugin 'vim-airline/vim-airline-themes'
29-
Plugin 'godlygeek/csapprox'
30-
Plugin 'mbbill/undotree'
31-
Plugin 'nathanaelkane/vim-indent-guides'
32-
Plugin 'airblade/vim-gitgutter'
33-
Plugin 'scrooloose/nerdcommenter'
34-
Plugin 'godlygeek/tabular'
35-
Plugin 'w0rp/ale'
36+
"Plugin 'godlygeek/csapprox'
37+
"Plugin 'nathanaelkane/vim-indent-guides'
38+
"Plugin 'airblade/vim-gitgutter'
39+
"Plugin 'scrooloose/nerdcommenter'
40+
"Plugin 'w0rp/ale'
3641

3742

3843
" TODO potentially use, settings below
3944
" Plugin 'klen/python-mode'
4045

41-
Plugin 'kchmck/vim-coffee-script'
42-
Plugin 'pangloss/vim-javascript'
43-
Plugin 'mxw/vim-jsx'
44-
Plugin 'elzr/vim-json'
45-
Plugin 'hail2u/vim-css3-syntax'
46-
Plugin 'tpope/vim-haml'
47-
Plugin 'slim-template/vim-slim.git'
48-
Plugin 'tpope/vim-rails.git'
49-
Plugin 'vim-ruby/vim-ruby.git'
50-
Plugin 'ngmy/vim-rubocop'
51-
Plugin 'tpope/vim-bundler.git'
52-
Plugin 'chase/vim-ansible-yaml'
53-
Plugin 'mtscout6/vim-cjsx'
54-
55-
" May need to use classic vim-latex-suite as this is a fork
56-
"Plugin 'gerw/vim-latex-suite'
57-
Plugin 'lervag/vimtex'
58-
59-
Plugin 'freitass/todo.txt-vim'
60-
61-
Plugin 'hashivim/vim-terraform'
62-
63-
call vundle#end()
46+
"Plugin 'pangloss/vim-javascript'
47+
"Plugin 'mxw/vim-jsx'
48+
"Plugin 'elzr/vim-json'
49+
"Plugin 'hail2u/vim-css3-syntax'
50+
"Plugin 'tpope/vim-haml'
51+
"Plugin 'slim-template/vim-slim.git'
52+
"Plugin 'tpope/vim-rails.git'
53+
"Plugin 'vim-ruby/vim-ruby.git'
54+
"Plugin 'ngmy/vim-rubocop'
55+
"Plugin 'tpope/vim-bundler.git'
56+
"Plugin 'chase/vim-ansible-yaml'
57+
58+
"Plugin 'freitass/todo.txt-vim'
59+
60+
"Plugin 'hashivim/vim-terraform'
61+
6462
filetype plugin indent on " Automatically detect file types.
6563

6664
set background=dark
@@ -87,9 +85,6 @@ set viewoptions=folds,options,cursor,unix,slash " Better Unix / Windows compatib
8785

8886
set spell
8987
set spell spelllang=en
90-
au FileType apache set spell nospell
91-
au FileType conf set spell nospell
92-
au FileType make set spell nospell
9388
set dictionary=/usr/share/dict/words
9489

9590
" http://vim.wikia.com/wiki/Restore_cursor_to_file_position_in_previous_editing_session
@@ -154,23 +149,23 @@ highlight clear SignColumn
154149
" in relative mode. Things like vim-gitgutter will match LineNr highlight
155150
highlight clear LineNr
156151

157-
if has('cmdline_info')
158-
set ruler " Show the ruler
159-
set rulerformat=%30(%=\:b%n%y%m%r%w\ %l,%c%V\ %P%) " A ruler on steroids
160-
set showcmd " Show partial commands in status line and selected characters/lines in visual mode
161-
endif
162-
163-
if has('statusline')
164-
set laststatus=2
165-
166-
" Broken down into easily includeable segments
167-
set statusline=%<%f\ " Filename
168-
set statusline+=%w%h%m%r " Options
169-
set statusline+=%{fugitive#statusline()} " Git Hotness
170-
set statusline+=\ [%{&ff}/%Y] " Filetype
171-
set statusline+=\ [%{getcwd()}] " Current dir
172-
set statusline+=%=%-14.(%l,%c%V%)\ %p%% " Right aligned file nav info
173-
endif
152+
"if has('cmdline_info')
153+
" set ruler " Show the ruler
154+
" set rulerformat=%30(%=\:b%n%y%m%r%w\ %l,%c%V\ %P%) " A ruler on steroids
155+
" set showcmd " Show partial commands in status line and selected characters/lines in visual mode
156+
"endif
157+
158+
"if has('statusline')
159+
" set laststatus=2
160+
"
161+
" " Broken down into easily includeable segments
162+
" set statusline=%<%f\ " Filename
163+
" set statusline+=%w%h%m%r " Options
164+
" set statusline+=%{fugitive#statusline()} " Git Hotness
165+
" set statusline+=\ [%{&ff}/%Y] " Filetype
166+
" set statusline+=\ [%{getcwd()}] " Current dir
167+
" set statusline+=%=%-14.(%l,%c%V%)\ %p%% " Right aligned file nav info
168+
"endif
174169

175170
set backspace=indent,eol,start " Backspace for dummies
176171
set linespace=0 " No extra spaces between rows
@@ -219,12 +214,15 @@ au FileType gitcommit au! BufEnter COMMIT_EDITMSG call setpos('.', [0, 1, 1, 0])
219214
au FileType yaml setl sw=2 sts=2 et
220215
au FileType ruby setl sw=2 sts=2 et
221216
au FileType slim setl sw=2 sts=2 et
222-
au FileType coffee setl sw=2 sts=2 et
223217
au FileType sass setl sw=2 sts=2 et
224218
au FileType scss setl sw=2 sts=2 et
225219
au FileType javascript.jsx setl sw=2 sts=2 et
226220
au FileType javascript setl sw=2 sts=2 et
227221

222+
au FileType apache set spell nospell
223+
au FileType conf set spell nospell
224+
au FileType make set spell nospell
225+
228226
" Remove trailing whitespaces and ^M chars in programs
229227
function! StripTrailingWhitespace()
230228
" Preparation: save last search, and cursor position.
@@ -237,8 +235,7 @@ function! StripTrailingWhitespace()
237235
let @/=_s
238236
call cursor(l, c)
239237
endfunction
240-
"autocmd FileType c,cpp,java,go,php,ruby,javascript,python,haml,xml,yml,coffee autocmd BufWritePre <buffer> call StripTrailingWhitespace()
241-
autocmd BufNewFile,BufReadPost *.coffee setl shiftwidth=2 expandtab
238+
autocmd FileType c,cpp,java,go,php,ruby,javascript,python,haml,xml,yml autocmd BufWritePre <buffer> call StripTrailingWhitespace()
242239

243240
let mapleader = '\'
244241

@@ -324,33 +321,19 @@ map <Leader>e :e <C-R>=expand("%:p:h") . "/" <CR>
324321
map zl zL
325322
map zh zH
326323
327-
" Plugin-specific configuration
328-
329-
" Tabularize
330-
nmap <Leader>a& :Tabularize /&<CR>
331-
vmap <Leader>a& :Tabularize /&<CR>
332-
nmap <Leader>a= :Tabularize /=<CR>
333-
vmap <Leader>a= :Tabularize /=<CR>
334-
nmap <Leader>a: :Tabularize /:<CR>
335-
vmap <Leader>a: :Tabularize /:<CR>
336-
nmap <Leader>a:: :Tabularize /:\zs<CR>
337-
vmap <Leader>a:: :Tabularize /:\zs<CR>
338-
nmap <Leader>a, :Tabularize /,<CR>
339-
vmap <Leader>a, :Tabularize /,<CR>
340-
nmap <Leader>a,, :Tabularize /,\zs<CR>
341-
vmap <Leader>a,, :Tabularize /,\zs<CR>
342-
nmap <Leader>a<Bar> :Tabularize /<Bar><CR>
343-
vmap <Leader>a<Bar> :Tabularize /<Bar><CR>
344-
345-
" JSON: TODO figure out what this does, from spf13
346324
nmap <leader>jt <Esc>:%!python -m json.tool<CR><Esc>:set filetype=json<CR>
347325
326+
" Plugin-specific configuration
327+
348328
" PyMode TODO figure out whether to use, from spf13
349329
" let g:pymode_lint_checker = "pyflakes"
350330
" let g:pymode_utils_whitespaces = 0
351331
" let g:pymode_options = 0
352332

353-
" ctrlp
333+
" ctrlp / fruzzy
334+
let g:fruzzy#usenative = 1
335+
let g:fruzzy#sortonempty = 1
336+
354337
let g:ctrlp_working_path_mode = 'ra'
355338
nnoremap <silent> <Leader>t :CtrlP<CR>
356339
nnoremap <silent> <Leader>y :CtrlPMRU<CR>
@@ -370,37 +353,38 @@ let g:ctrlp_user_command = {
370353
\ 'fallback': 'find %s -type f'
371354
\ }
372355
let g:ctrlp_follow_symlinks = 1
373-
let g:ctrlp_match_func = { 'match': 'pymatcher#PyMatch' }
356+
let g:ctrlp_match_func = {'match': 'fruzzy#ctrlp#matcher'}
357+
let g:ctrlp_match_current_file = 1 " to include current file in matches
374358

375359
" Fugitive
376-
nnoremap <silent> <leader>gs :Gstatus<CR>
377-
nnoremap <silent> <leader>gd :Gdiff<CR>
378-
nnoremap <silent> <leader>gc :Gcommit<CR>
379-
nnoremap <silent> <leader>gb :Gblame<CR>
380-
nnoremap <silent> <leader>gl :Glog<CR>
381-
nnoremap <silent> <leader>gp :Git push<CR>
382-
nnoremap <silent> <leader>gr :Gread<CR>:GitGutter<CR>
383-
nnoremap <silent> <leader>gw :Gwrite<CR>:GitGutter<CR>
384-
nnoremap <silent> <leader>ge :Gedit<CR>
385-
nnoremap <silent> <leader>gg :GitGutterToggle<CR>
360+
"nnoremap <silent> <leader>gs :Gstatus<CR>
361+
"nnoremap <silent> <leader>gd :Gdiff<CR>
362+
"nnoremap <silent> <leader>gc :Gcommit<CR>
363+
"nnoremap <silent> <leader>gb :Gblame<CR>
364+
"nnoremap <silent> <leader>gl :Glog<CR>
365+
"nnoremap <silent> <leader>gp :Git push<CR>
366+
"nnoremap <silent> <leader>gr :Gread<CR>:GitGutter<CR>
367+
"nnoremap <silent> <leader>gw :Gwrite<CR>:GitGutter<CR>
368+
"nnoremap <silent> <leader>ge :Gedit<CR>
369+
"nnoremap <silent> <leader>gg :GitGutterToggle<CR>
386370

387371
" gitgutter
388-
set signcolumn=yes
372+
"set signcolumn=yes
389373

390374
" UndoTree
391375
nnoremap <Leader>u :UndotreeToggle<CR>
392376
" If undotree is opened, it is likely one wants to interact with it.
393377
let g:undotree_SetFocusWhenToggle=1
394378

395379
" indent_guides
396-
let g:indent_guides_start_level = 2
397-
let g:indent_guides_guide_size = 1
398-
let g:indent_guides_enable_on_vim_startup = 1
380+
"let g:indent_guides_start_level = 2
381+
"let g:indent_guides_guide_size = 1
382+
"let g:indent_guides_enable_on_vim_startup = 1
399383

400384
" vim-airline
401385
let g:airline_theme = 'murmur'
402386
let g:airline_enable_branch = 1
403-
let g:airline#extensions#ale#enabled = 1
387+
"let g:airline#extensions#ale#enabled = 1
404388
set ttimeoutlen=50
405389

406390
" vim-powerline symbols
@@ -442,37 +426,6 @@ else
442426
endif
443427
endif
444428

445-
"let g:tex_flavor = 'latex'
446-
"let g:Tex_MultipleCompileFormat = 'pdf,aux'
447-
"let g:Tex_TreatMacViewerAsUNIX = 0
448-
"let g:Tex_DefaultTargetFormat = 'pdf'
449-
"let g:Tex_CompileRule_pdf = 'pdflatex -synctex=1 --interaction=nonstopmode $*'
450-
"let g:Tex_ViewRule_pdf = 'Skim'
451-
452-
let g:vimtex_view_general_viewer
453-
\ = '/Users/arjun/Applications/Skim.app/Contents/SharedSupport/displayline'
454-
let g:vimtex_view_general_options = '-r @line @pdf @tex'
455-
456-
" This adds a callback hook that updates Skim after compilation
457-
let g:vimtex_latexmk_callback_hooks = ['UpdateSkim']
458-
function! UpdateSkim(status)
459-
if !a:status | return | endif
460-
461-
let l:out = b:vimtex.out()
462-
let l:tex = expand('%:p')
463-
let l:cmd = [g:vimtex_view_general_viewer, '-r']
464-
if !empty(system('pgrep Skim'))
465-
call extend(l:cmd, ['-g'])
466-
endif
467-
if has('nvim')
468-
call jobstart(l:cmd + [line('.'), l:out, l:tex])
469-
elseif has('job')
470-
call job_start(l:cmd + [line('.'), l:out, l:tex])
471-
else
472-
call system(join(l:cmd + [line('.'), shellescape(l:out), shellescape(l:tex)], ' '))
473-
endif
474-
endfunction
475-
476429
" Run a shell command
477430
function! s:RunShellCommand(cmdline)
478431
botright new

.zimrc

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Start configuration added by Zim install {{{
2+
# -------
3+
# Modules
4+
# -------
5+
6+
# Sets sane Zsh built-in environment options.
7+
zmodule environment
8+
# Provides handy git aliases and functions.
9+
zmodule git
10+
# Applies correct bindkeys for input events.
11+
zmodule input
12+
# Sets a custom terminal title.
13+
zmodule termtitle
14+
# Utility aliases and functions. Adds colour to ls, grep and less.
15+
zmodule utility
16+
17+
#
18+
# Prompt
19+
#
20+
# Exposes to prompts how long the last command took to execute, used by asciiship.
21+
zmodule duration-info
22+
# Exposes git repository status information to prompts, used by asciiship.
23+
zmodule git-info
24+
# A heavily reduced, ASCII-only version of the Spaceship and Starship prompts.
25+
zmodule eriner
26+
27+
# Additional completion definitions for Zsh.
28+
zmodule zsh-users/zsh-completions
29+
# Enables and configures smart and extensive tab completion.
30+
# completion must be sourced after zsh-users/zsh-completions
31+
zmodule completion
32+
# Fish-like autosuggestions for Zsh.
33+
zmodule zsh-users/zsh-autosuggestions
34+
# Fish-like syntax highlighting for Zsh.
35+
# zsh-users/zsh-syntax-highlighting must be sourced after completion
36+
zmodule zsh-users/zsh-syntax-highlighting
37+
# Fish-like history search (up arrow) for Zsh.
38+
# zsh-users/zsh-history-substring-search must be sourced after zsh-users/zsh-syntax-highlighting
39+
zmodule zsh-users/zsh-history-substring-search
40+
# }}} End configuration added by Zim install
41+
#
42+
zmodule fasd

.zlogin

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Start configuration added by Zim install {{{
2+
#
3+
# User configuration sourced by login shells
4+
#
5+
6+
# Initialize Zim
7+
source ${ZIM_HOME}/login_init.zsh -q &!
8+
# }}} End configuration added by Zim install

.zshenv

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Start configuration added by Zim install {{{
2+
#
3+
# User configuration sourced by all invocations of the shell
4+
#
5+
6+
# Define Zim location
7+
: ${ZIM_HOME=${ZDOTDIR:-${HOME}}/.zim}
8+
# }}} End configuration added by Zim install

0 commit comments

Comments
 (0)