10 Commits 8dc75ab5d7 ... b79d70a5ec

Author SHA1 Message Date
  Kyle P Davis b79d70a5ec feat(vim): remove nerdtree plugin 2 years ago
  Kyle P Davis 32ceb69f70 feat(vim): remove old ctrlp-cmdpalette plugin 2 years ago
  Kyle P Davis 2e82deb929 feat(vim): remove old conque-shell plugin 2 years ago
  Kyle P Davis f1c3c235fd feat(vim): add rust plugin 2 years ago
  Kyle P Davis 3a4b7fedcf feat(vim): update plugins 2 years ago
  Kyle P Davis 7b70aa1aef feat(vim): update search and completion options 2 years ago
  Kyle P Davis 9ded05b012 feat(vim): prefer ripgrep if installed 2 years ago
  Kyle P Davis 500be863d0 docs: add small header to top of profile 2 years ago
  Kyle P Davis 33e913f0d7 fix: pin zsh-async to main branch 2 years ago
  Kyle P Davis 4e45db9fba refactor: use vars in install to make keyboard app shortcuts easier to read 2 years ago
3 changed files with 45 additions and 32 deletions
  1. 4 1
      .profile
  2. 27 23
      .vimrc
  3. 14 8
      install.sh

+ 4 - 1
.profile

@@ -1,3 +1,6 @@
+# Shell Profile/Config File
+# NOTE: symlinked to multiple files to apply in multiple shells/scenarios; see install.sh
+
 ###############################################################################
 # Non-interactive shell configuration
 ###############################################################################
@@ -141,7 +144,7 @@ if [ "$ZSH_VERSION" ]; then
 
 	BUNDLES=(
 		zsh-users/zsh-syntax-highlighting
-		mafredri/zsh-async
+		mafredri/zsh-async@main
 		sindresorhus/pure@main
 	)
 	for B in ${=BUNDLES}; do

+ 27 - 23
.vimrc

@@ -3,7 +3,6 @@ set ruler
 set mouse=a
 set nocompatible
 set bs=2
-set hlsearch
 set nowrap
 
 " give me all of teh colors!!
@@ -12,6 +11,17 @@ set bg=dark
 colorscheme elflord
 syntax on
 
+" misc
+set path+=** " make :find tab-completion search subdirectories
+set wildmenu " show tab-complete menu for : commands
+
+" search
+set ignorecase " case insensitive search
+set smartcase  " auto switch to case-sensitive if uppercase *is* used
+set incsearch  " live incremental searching
+set showmatch  " show matches live while typing
+set hlsearch   " highlight matches
+
 " tabs
 set shiftwidth=4
 set tabstop=4
@@ -43,8 +53,11 @@ autocmd BufNewFile,BufReadPost *.json set filetype=json syntax=javascript
 autocmd BufNewFile,BufReadPost *.md set filetype=markdown
 autocmd BufNewFile,BufReadPost *.go set filetype=go
 
-" run prettier with the = key
-autocmd FileType * setlocal equalprg=npx\ -q\ prettier\ --stdin-filepath\ %
+" prefer ripgrep if available
+if executable('rg')
+	set grepprg=rg\ --vimgrep\ $*
+	set grepformat^=%f:%l:%c:%m
+endif
 
 " VIM-PLUG PLUGINS (WITH FIRST-RUN AUTOINSTALL)
 if empty(glob('~/.vim/autoload/plug.vim'))
@@ -53,30 +66,25 @@ if empty(glob('~/.vim/autoload/plug.vim'))
 endif
 call plug#begin()
 
-Plug 'bling/vim-airline'  " more helpful tab line and status lines with colors
+Plug 'tpope/vim-commentary'  " comment stuff out
+
+Plug 'vim-airline/vim-airline'  " more helpful tab line and status lines with colors
 let g:airline#extensions#tabline#enabled = !has('gui_running')
 let g:airline#extensions#tabline#show_buffers = 0
 set laststatus=2
 set ttimeoutlen=50
-"TODO: decide if I care enough for:  https://github.com/Lokaltog/powerline-fonts
 
-Plug 'scrooloose/nerdtree', { 'on':  'NERDTreeToggle' }  " tree file browser
-map <C-n> :NERDTreeToggle<CR>
-map <C-\> :NERDTreeToggle<CR>
-"TODO: detect SHIFT?: map <Shift><C-\> :NERDTreeFind<CR>
-
-Plug 'terryma/vim-multiple-cursors'  " multiple cursor support
+Plug 'mg979/vim-visual-multi'  " multiple cursor support
 
 Plug 'editorconfig/editorconfig-vim'
 
-Plug 'scrooloose/syntastic'  " multi-language syntax checker
+Plug 'vim-syntastic/syntastic'  " multi-language syntax checker
 let g:syntastic_check_on_open=1
 let g:syntastic_aggregate_errors=1
 let g:syntastic_javascript_checkers = ['eslint']
 
 Plug 'ntpeters/vim-better-whitespace'  " whitespace!!
 let g:strip_whitespace_on_save = 1
-let g:better_whitespace_filetypes_blacklist=['conque_term']
 
 Plug 'nathanaelkane/vim-indent-guides'  " pretty indent guides with softtabs
 let g:indent_guides_guide_size = 1
@@ -87,21 +95,15 @@ autocmd VimEnter * :IndentGuidesEnable
 
 Plug 'lilydjwg/colorizer'  " colorize CSS inline
 
-Plug 'kien/ctrlp.vim'  " fuzzy file matcher / opener
-let g:ctrlp_user_command="find '%s' ! -wholename '*/.git/*' ! -wholename '*/node_modules/*' ! -wholename '*/report/*' -type f"
-
-Plug 'fisadev/vim-ctrlp-cmdpalette'  " fuzzy command matcher / runner
-"TODO: detect SHIFT?: map <Shift><C-p> :CtrlPCmdPalette<CR>
+Plug 'ctrlpvim/ctrlp.vim'  " fuzzy file matcher / opener
+let ctrlp_user_cmd_fallback = 'find %s -type f'
+if executable('rg') | let ctrlp_user_cmd_fallback = 'rg --files %s' | endif
+let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files . -co --exclude-standard', ctrlp_user_cmd_fallback]
 
 Plug 'tpope/vim-fugitive'  " git commands and statusline
 
 Plug 'mhinz/vim-signify'  " label VCS changes in gutter
 
-Plug 'oplatek/Conque-Shell'  " a shell in a buffer
-let g:ConqueTerm_ReadUnfocused = 1
-let g:ConqueTerm_InsertOnEnter = 1
-let g:ConqueTerm_CloseOnEnd = 1
-
 Plug 'pangloss/vim-javascript'  " better JavaScript support
 
 Plug 'moll/vim-node'  " nodejs extras
@@ -110,4 +112,6 @@ Plug 'leafgarland/typescript-vim'  " TypeScript support
 autocmd QuickFixCmdPost [^l]* nested cwindow
 autocmd QuickFixCmdPost    l* nested lwindow
 
+Plug 'rust-lang/rust.vim'
+
 call plug#end()

+ 14 - 8
install.sh

@@ -42,13 +42,19 @@ link "$CMD_DIR/.profile" "$HOME/.bash_profile" # certain scenarios use this one
 
 OS=$(uname -s)
 if [ "$OS" = "Darwin" ]; then
-	# Enable "All Controls" for tab in SystemPreferences->Keyboard->Shortcuts
+	# Enable "All Controls" for tab in: System Settings > Keyboard > Keyboard navigation
 	defaults write -globalDomain AppleKeyboardUIMode -int 3
-	# Setup things for SystemPreferences->Keyboard->Shortcuts->App Shortcuts
-	defaults write -globalDomain NSUserKeyEquivalents -dict \
-		'\033Window\033Zoom' '@~^m' \
-		'\033Window\033Move Window to Left Side of Screen' '@~^\U2190' \
-		'\033Window\033Move Window to Right Side of Screen' '@~^\U2192' \
-		'\033Window\033Tile Window to Left of Screen' '@~^$\U2190' \
-		'\033Window\033Tile Window to Right of Screen' '@~^$\U2192'
+
+	# Setup things for: System Settings > Keyboard > Keyboard Shortcuts > App Shortcuts
+	Sep="\033" KCmd='@' KOpt='~' KCtrl='^' KShift='$' KLeft='\U2190' KRight='\U2192'
+	defaults write -globalDomain NSUserKeyEquivalents -dict-add \
+		"${Sep}Window${Sep}Zoom" "${KCmd}${KOpt}${KCtrl}m" \
+		"${Sep}Window${Sep}Move Window to Left Side of Screen" "${KCmd}${KOpt}${KCtrl}${KLeft}" \
+		"${Sep}Window${Sep}Move Window to Right Side of Screen" "${KCmd}${KOpt}${KCtrl}${KRight}" \
+		"${Sep}Window${Sep}Tile Window to Left of Screen" "${KCmd}${KOpt}${KCtrl}${KShift}${KLeft}" \
+		"${Sep}Window${Sep}Tile Window to Right of Screen" "${KCmd}${KOpt}${KCtrl}${KShift}${KRight}" \
+		"${Sep}Window${Sep}Move Window Back to Mac" "${KCmd}${KOpt}${KCtrl}1"
+
+	# Nudge the prefs daemon to reload things
+	killall cfprefsd
 fi