diff --git a/.dockerignore b/.dockerignore index eaf51a9..9ed254c 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,4 +1,3 @@ docker-compose.yml Dockerfile -bin/fix_macvim_external_display.sh bin/macos diff --git a/.gitignore b/.gitignore index 4364576..fc093ed 100644 --- a/.gitignore +++ b/.gitignore @@ -1,17 +1,7 @@ <<<<<<< HEAD custom/zsh -vim/backups -vim/view *un~ -vim/.netrwhist -vim/tmp -vim/spell -vim/after/.vimrc.after -vim/.vundles.local -vim/.vundles.local.bak -vim/bundle -vim/sessions .netrwhist bin/subl tags diff --git a/.tmux.conf b/.tmux.conf index 5f8c1f4..89f07af 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -33,20 +33,15 @@ bind -r J resize-pane -D 5 bind -r K resize-pane -U 5 bind -r L resize-pane -R 5 -# Smart pane switching with awareness of Vim splits. -# See: https://github.com/christoomey/vim-tmux-navigator -is_vim="ps -o state= -o comm= -t '#{pane_tty}' \ - | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'" -bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L' -bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D' -bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U' -bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R' - -tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")' -if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \ - "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\' 'select-pane -l'" -if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \ - "bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\' 'select-pane -l'" +# Direct pane switching. This used to be vim-tmux-navigator, which ran +# `ps | grep` on EVERY C-h/j/k/l press just to ask whether vim was in the +# pane. vim is gone, so the probe can only ever answer no -- two forks per +# pane switch for nothing. +bind-key -n 'C-h' select-pane -L +bind-key -n 'C-j' select-pane -D +bind-key -n 'C-k' select-pane -U +bind-key -n 'C-l' select-pane -R +bind-key -n 'C-\' select-pane -l bind-key -T copy-mode-vi 'C-h' select-pane -L bind-key -T copy-mode-vi 'C-j' select-pane -D diff --git a/.vim b/.vim deleted file mode 120000 index 22e280d..0000000 --- a/.vim +++ /dev/null @@ -1 +0,0 @@ -.yadr/vim \ No newline at end of file diff --git a/.vimrc b/.vimrc deleted file mode 120000 index c9f9ceb..0000000 --- a/.vimrc +++ /dev/null @@ -1 +0,0 @@ -.yadr/vimrc \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index b8eca16..c9a7046 100644 --- a/Dockerfile +++ b/Dockerfile @@ -38,7 +38,6 @@ RUN DEBIAN_FRONTEND=noninteractive \ ruby-full \ sudo \ tmux \ - vim \ wget \ zsh && \ apt-get clean && \ diff --git a/Rakefile b/Rakefile index 7db1d1d..afed51e 100644 --- a/Rakefile +++ b/Rakefile @@ -1,12 +1,11 @@ require 'rake' require 'fileutils' -require File.join(File.dirname(__FILE__), 'bin', 'yadr', 'vundle') desc "Hook our dotfiles into system-standard positions." task :install => [:submodule_init, :submodules] do puts puts "======================================================" - puts "Welcome to YADR Installation." + puts "Welcome to drunkendotfiles installation." puts "======================================================" puts @@ -19,11 +18,6 @@ task :install => [:submodule_init, :submodules] do install_files(Dir.glob('ruby/*')) if want_to_install?('rubygems config (faster/no docs)') install_files(Dir.glob('ctags/*')) if want_to_install?('ctags config (better js/ruby support)') install_files(Dir.glob('tmux/*')) if want_to_install?('tmux config') - install_files(Dir.glob('vimify/*')) if want_to_install?('vimification of command line tools') - if want_to_install?('vim configuration (highly recommended)') - install_files(Dir.glob('{vim,vimrc}')) - Rake::Task["install_vundle"].execute - end Rake::Task["install_prezto"].execute @@ -44,7 +38,6 @@ end desc 'Updates the installation' task :update do - Rake::Task["vundle_migration"].execute if needs_migration_to_vundle? Rake::Task["install"].execute #TODO: for now, we do the same as install. But it would be nice #not to clobber zsh files @@ -60,7 +53,7 @@ desc "Init and update submodules." task :submodules do unless ENV["SKIP_SUBMODULES"] puts "======================================================" - puts "Downloading YADR submodules...please wait" + puts "Downloading drunkendotfiles submodules...please wait" puts "======================================================" run %{ @@ -72,45 +65,6 @@ task :submodules do end end -desc "Performs migration from pathogen to vundle" -task :vundle_migration do - puts "======================================================" - puts "Migrating from pathogen to vundle vim plugin manager. " - puts "This will move the old .vim/bundle directory to" - puts ".vim/bundle.old and replacing all your vim plugins with" - puts "the standard set of plugins. You will then be able to " - puts "manage your vim's plugin configuration by editing the " - puts "file .vim/vundles.vim" - puts "======================================================" - - Dir.glob(File.join('vim', 'bundle','**')) do |sub_path| - run %{git config -f #{File.join('.git', 'config')} --remove-section submodule.#{sub_path}} - # `git rm --cached #{sub_path}` - FileUtils.rm_rf(File.join('.git', 'modules', sub_path)) - end - FileUtils.mv(File.join('vim','bundle'), File.join('vim', 'bundle.old')) -end - -desc "Runs Vundle installer in a clean vim environment" -task :install_vundle do - puts "======================================================" - puts "Installing and updating vundles." - puts "The installer will now proceed to run PluginInstall to install vundles." - puts "======================================================" - - puts "" - - vundle_path = File.join('vim','bundle', 'vundle') - unless File.exist?(vundle_path) - run %{ - cd $HOME/.yadr - git clone https://github.com/gmarik/vundle.git #{vundle_path} - } - end - - Vundle::update_vundle -end - task :default => 'install' @@ -173,7 +127,6 @@ def install_homebrew puts "Installing Homebrew packages...There may be some warnings." puts "======================================================" run %{brew install zsh ctags git hub tmux reattach-to-user-namespace the_silver_searcher ghi} - run %{brew install macvim} puts puts end @@ -333,16 +286,6 @@ def install_files(files, method = :symlink) end end -def needs_migration_to_vundle? - File.exist? File.join('vim', 'bundle', 'tpope-vim-pathogen') -end - - -def list_vim_submodules - result=`git submodule -q foreach 'echo $name"||"\`git remote -v | awk "END{print \\\\\$2}"\`'`.select{ |line| line =~ /^vim.bundle/ }.map{ |line| line.split('||') } - Hash[*result.flatten] -end - def apply_theme_to_iterm_profile_idx(index, color_scheme_path) values = Array.new 16.times { |i| values << "Ansi #{i} Color" } @@ -354,13 +297,22 @@ def apply_theme_to_iterm_profile_idx(index, color_scheme_path) end def success_msg(action) - puts %q{ - _ _ _ - | | | | | | - | |___| |_____ __| | ____ - |_____ (____ |/ _ |/ ___) - _____| / ___ ( (_| | | - (_______\_____|\____|_| - } - puts "YADR has been #{action}. Please restart your terminal and vim." + # Single-quoted heredoc: no interpolation and NO escape processing, so the + # backslashes in the art survive verbatim. %q{} would collapse every \ to \. + banner = <<~'BANNER' + ___ ___ _ _ _ _ _ _____ _ _ ___ ___ _____ ___ ___ _ ___ ___ + | \| _ \ | | | \| | |/ / __| \| | \ / _ \_ _| __|_ _| | | __/ __| + | |) | / |_| | .` | ' <| _|| .` | |) | (_) || | | _| | || |__| _|\__ \ + |___/|_|_\\___/|_|\_|_|\_\___|_|\_|___/ \___/ |_| |_| |___|____|___|___/ + BANNER + + # Rainbow it when lolcat is present; fall back to plain text so the installer + # never dies on a box that lacks it. + if system('command -v lolcat >/dev/null 2>&1') + IO.popen('lolcat', 'w') { |io| io.puts banner } + else + puts banner + end + + puts "drunkendotfiles has been #{action}. Please restart your terminal." end diff --git a/bin/fix_macvim_external_display.sh b/bin/fix_macvim_external_display.sh deleted file mode 100755 index cdcd698..0000000 --- a/bin/fix_macvim_external_display.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -rm ~/Library/Preferences/org.vim.MacVim.LSSharedFileList.plist && \ -rm ~/Library/Preferences/org.vim.MacVim.plist && \ -echo "Files deleted sucessfully. You may have to restart OSX." diff --git a/bin/yadr/vundle.rb b/bin/yadr/vundle.rb deleted file mode 100644 index c59e5d5..0000000 --- a/bin/yadr/vundle.rb +++ /dev/null @@ -1,50 +0,0 @@ -require 'fileutils' - -module Vundle - @vundles_path = File.expand_path File.join(ENV['HOME'], '.vim', '.vundles.local') - def self.add_plugin_to_vundle(plugin_repo) - return if contains_vundle? plugin_repo - - vundles = vundles_from_file - last_bundle_dir = vundles.rindex{ |line| line =~ /^Bundle / } - last_bundle_dir = last_bundle_dir ? last_bundle_dir+1 : 0 - vundles.insert last_bundle_dir, "Bundle \"#{plugin_repo}\"" - write_vundles_to_file vundles - end - - def self.remove_plugin_from_vundle(plugin_repo) - vundles = vundles_from_file - deleted_value = vundles.reject!{ |line| line =~ /Bundle "#{plugin_repo}"/ } - - write_vundles_to_file vundles - - !deleted_value.nil? - end - - def self.vundle_list - vundles_from_file.select{ |line| line =~ /^Bundle .*/ }.map{ |line| line.gsub(/Bundle "(.*)"/, '\1')} - end - - def self.update_vundle - system "vim --noplugin -u #{ENV['HOME']}/.vim/vundles.vim -N \"+set hidden\" \"+syntax on\" \"+let g:session_autosave = 'no'\" +BundleClean +BundleInstall! +qall" - end - - - private - def self.contains_vundle?(vundle_name) - FileUtils.touch(@vundles_path) unless File.exist? @vundles_path - File.read(@vundles_path).include?(vundle_name) - end - - def self.vundles_from_file - FileUtils.touch(@vundles_path) unless File.exist? @vundles_path - File.read(@vundles_path).split("\n") - end - - def self.write_vundles_to_file(vundles) - FileUtils.cp(@vundles_path, "#{@vundles_path}.bak") - vundle_file = File.open(@vundles_path, "w") - vundle_file.write(vundles.join("\n")) - vundle_file.close - end -end diff --git a/bin/yadr/yadr-vim-add-plugin b/bin/yadr/yadr-vim-add-plugin deleted file mode 100755 index 3a7c50b..0000000 --- a/bin/yadr/yadr-vim-add-plugin +++ /dev/null @@ -1,28 +0,0 @@ -#!/usr/bin/env ruby -# -require File.join(File.dirname(__FILE__), 'default_libs') -require File.join(File.dirname(__FILE__), 'vundle') - -GitStyleBinary.command do - version "yadr-add-vim-plugin 1.0" - - short_desc "Add a vim plugin from a repo" - - opt :url, "Repository URL (see usage)", :required => true, :type => String - - banner <<-'EOS' - Usage: yadr-add-vim-plugin --url [URL] - Specify a plugin repository URL in one of the following forms: - - Custom repository URL (full URL): git://git.wincent.com/command-t.git - - Github repository (username/repo_name): robgleesson/hammer.vim.git - - Vim script repository (plugin_name): FuzzyFinder - EOS - run do |command| - repo=command.opts[:url] - repo=command.opts[:url] - puts "Adding \"#{repo}\" to the plugin list" - bundle_path=repo.gsub(/http.?:\/\/github\.com\//, "") - Vundle::add_plugin_to_vundle repo - Vundle::update_vundle - end -end diff --git a/bin/yadr/yadr-vim-delete-plugin b/bin/yadr/yadr-vim-delete-plugin deleted file mode 100755 index 81237e0..0000000 --- a/bin/yadr/yadr-vim-delete-plugin +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env ruby -require File.join(File.dirname(__FILE__), 'default_libs') -require File.join(File.dirname(__FILE__), 'vundle') - -GitStyleBinary.command do - version "yadr-delete-vim-plugin 1.0" - - short_desc "Removes a vim plugin" - opt :url, "Repository URL (see usage)", :required => true, :type => String - - banner <<-'EOS' - Usage: yadr-delete-vim-plugin --url [URL] - Specify a plugin repository URL in one of the following forms: - - Custom repository URL (full URL): git://git.wincent.com/command-t.git - - Github repository (username/repo_name): robgleesson/hammer.vim.git - - Vim script repository (plugin_name): FuzzyFinder - EOS - run do |command| - repo=command.opts[:url] - puts "Removing \"#{repo}\" from the plugin list" - bundle_path=repo.gsub("https://github.com/", "") - removed=Vundle::remove_plugin_from_vundle repo - if removed - Vundle::update_vundle - puts "Successfully removed\"#{repo}\"" - else - puts "Unable to find \"#{repo}\" among the installed plugins" - end - end -end diff --git a/bin/yadr/yadr-vim-list-plugin b/bin/yadr/yadr-vim-list-plugin deleted file mode 100755 index fc3c376..0000000 --- a/bin/yadr/yadr-vim-list-plugin +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env ruby -require File.join(File.dirname(__FILE__), 'default_libs') -require File.join(File.dirname(__FILE__), 'vundle') - -GitStyleBinary.command do - version "yadr-list-vim-plugin 1.0" - - short_desc "List installed vim plugins" - - banner <<-'EOS' - Usage: yadr-list-vim-plugin - EOS - run do |command| - puts "Currently configured plugins:" - i=1 - Vundle::vundle_list.each do |plugin| - puts "#{i}. #{plugin}" - i=i+1 - end - end -end diff --git a/doc/vim/coding.md b/doc/vim/coding.md deleted file mode 100644 index 1338a0c..0000000 --- a/doc/vim/coding.md +++ /dev/null @@ -1,14 +0,0 @@ -* tComment - gcc to comment a line, gcp to comment blocks, nuff said -* rails.vim - syntax highlighting, gf (goto file) enhancements, and lots more. should be required for any rails dev -* rake.vim - like rails.vim but for non-rails projects. makes `:Rtags` and other commands just work -* ruby.vim - lots of general enhancements for ruby dev -* necomplcache - intelligent and fast complete as you type, and added Command-Space to select a completion (same as Ctrl-N) -* snipMate - offers textmate-like snippet expansion + snippets collection (honza/vim-snippets). Try hitting TAB after typing a snippet -* jasmine.vim - support for jasmine javascript unit testing, including snippets for it, before, etc.. -* vim-javascript-syntax, vim-jquery - better highlighting -* TagHighlight - highlights class names and method names -* vim-coffeescript - support for coffeescript, highlighting -* vim-stylus - support for stylus css language -* vim-bundler - work with bundled gems -* fugitive - "a git wrapper so awesome, it should be illegal...". Try `:Gstatus` and hit `-` to toggle files in and out of the index. Git `d` to see a diff. Use `git mergetool` or `gmt` to launch vim as a mergetool. The left buffer is your branch, the right is the incoming change, and in the middle is the working copy. Move to the left or right and use `dp` to put the change into the middle. Learn more: http://vimcasts.org/blog/2011/05/the-fugitive-series/ -* gitv - use `:gitv` for a better git log browser diff --git a/doc/vim/enhancements.md b/doc/vim/enhancements.md deleted file mode 100644 index 63d92a0..0000000 --- a/doc/vim/enhancements.md +++ /dev/null @@ -1,11 +0,0 @@ -* IndexedSearch - when you do searches will show you "Match 2 of 4" in the status line -* delimitMate - automatically closes quotes -* SearchComplete - tab completion in the / search window -* syntastic - automatic syntax checking when you save the file -* repeat - adds `.` (repeat command) support for complex commands like surround.vim. i.e. if you perform a surround and hit `.`, it will Just Work (vim by default will only repeat the last piece of the complex command) -* endwise - automatically closes blocks (if/end) -* autotag - automatically creates tags for fast sourcecode browsing. use `,f` over a symbol name to go to its definition -* matchit - helps with matching brackets, improves other plugins -* AnsiEsc - inteprets ansi color codes inside log files. great for looking at Rails logs -* solarized - a color scheme scientifically calibrated for awesomeness (including skwp mods for ShowMarks) -* Lightline - Improved status bar. Requires patched fonts (installed from fonts/ directory) diff --git a/doc/vim/keymaps.md b/doc/vim/keymaps.md deleted file mode 100644 index 2eabfec..0000000 --- a/doc/vim/keymaps.md +++ /dev/null @@ -1,7 +0,0 @@ -The files in `vim/settings` are customizations stored on a per-plugin -basis. The main keymap is available in yadr-keymap.vim, but some of the vim -files contain key mappings as well. - -If you are having unexpected behavior, wondering why a particular key works the way it does, -use: `:map [keycombo]` (e.g. `:map `) to see what the key is mapped to. For bonus points, you can see where the mapping was set by using `:verbose map [keycombo]`. -If you omit the key combo, you'll get a list of all the maps. You can do the same thing with nmap, imap, vmap, etc. diff --git a/doc/vim/manage_plugins.md b/doc/vim/manage_plugins.md deleted file mode 100644 index 573f0bf..0000000 --- a/doc/vim/manage_plugins.md +++ /dev/null @@ -1,12 +0,0 @@ -YADR comes with a dead simple plugin manager that just uses vundles and submodules, without any fancy config files. - -Add a plugin - - yav -u https://github.com/airblade/vim-rooter - -Delete a plugin - - ydv -u airblade/vim-rooter - -The aliases (yav=yadr vim-add-plugin), (ydp=yadr vim-delete-plugin) and (yuv=yadr vim-update-all-plugins) live in the aliases file. -You can then commit the change. It's good to have your own fork of this project to do that. diff --git a/doc/vim/navigation.md b/doc/vim/navigation.md deleted file mode 100644 index a350866..0000000 --- a/doc/vim/navigation.md +++ /dev/null @@ -1,8 +0,0 @@ -* NERDTree - everyone's favorite tree browser -* NERDTree-tabs - makes NERDTree play nice with MacVim tabs so that it's on every tab -* ShowMarks - creates a visual gutter to the left of the number column showing you your marks -* EasyMotion - hit , esc (forward) or , Shift Esc (back) and watch the magic happen. Just type the letters and jump directly to your target - in the provided vimrc the keys are optimized for home row mostly. Using @skwp modified EasyMotion which uses vimperator-style two character targets. -* CtrlP - , t to find a file -* Visual-star-search - make the * (star) search in visual mode behave like expected: searching for the whole selection instead of just the word under the cursor. -* Ag - super fast search by Silver Searcher. hit ,K to grep current word -* vim-tmux-navigator - nagivate between vim and tmux splits in the same way you move between normal vim splits. diff --git a/doc/vim/override.md b/doc/vim/override.md deleted file mode 100644 index b9d1130..0000000 --- a/doc/vim/override.md +++ /dev/null @@ -1,3 +0,0 @@ -You may use `~/.vimrc.before` for settings like the __leader__ setting. -You may use `~/.vimrc.after` (for those transitioning from janus) or `~/.yadr/vim/after/.vimrc.after` for any additional overrides/settings. -If you didn't have janus before, it is recommended to just put it in `~/.yadr/vim/after` so you can better manage your overrides. diff --git a/doc/vim/textobjects.md b/doc/vim/textobjects.md deleted file mode 100644 index b51c712..0000000 --- a/doc/vim/textobjects.md +++ /dev/null @@ -1,11 +0,0 @@ -* textobj-rubyblock - ruby blocks become vim textobjects denoted with `r`. try var/vir to select a ruby block, dar/dir for delete car/cir for change, =ar/=ir for formatting, etc -* vim-indentobject - manipulate chunks of code by indentation level (great for yaml) use vai/vii to select around an indent block, same as above applies -* argtextobj - manipulation of function arguments as an "a" object, so vaa/via, caa/cia, daa/dia, etc.. -* textobj-datetime - gives you `da` (date), `df` (date full) and so on text objects. useable with all standard verbs -* vim-textobj-entire - gives you `e` for entire document. so vae (visual around entire document), and etc -* vim-textobj-rubysymbol - gives you `:` textobj. so va: to select a ruby symbol. da: to delete a symbol..etc -* vim-textobj-function - gives you `f` textobj. so vaf to select a function -* vim-textobj-function-javascript - same as above, but for javascript functions -* vim-textobj-underscore - gives you `_` textobj. So vi_ selects what's inside a pair of underscores -* next-textobject - from Steve Losh, ability to use `n` such as vinb (visual inside (n)ext set of parens) -* textobj-word-column - gives you `c` (word) and `C` (WORD) for handling columns/blocks. diff --git a/doc/vim/utils.md b/doc/vim/utils.md deleted file mode 100644 index 078a96b..0000000 --- a/doc/vim/utils.md +++ /dev/null @@ -1,14 +0,0 @@ -* SplitJoin - easily split up things like ruby hashes into multiple lines or join them back together. Try :SplitjoinJoin and :SplitjoinSplit or use the bindings sj(split) and sk(unsplit) - mnemonically j and k are directions down and up -* tabularize - align code effortlessly by using :Tabularize /[character] to align by a character, or try the keymaps -* yankring - effortless sanity for pasting. every time you yank something it goes into a buffer. after hitting p to paste, use ctrl-p or ctrl-n to cycle through the paste options. great for when you accidentally overwrite your yank with a delete. -* surround - super easy quote and tag manipulation - ysiw" - sourround inner word with quotes. ci"' - change inner double quotes to single quotes, etc -* greplace - use :Gsearch to find across many files, replace inside the changes, then :Greplace to do a replace across all matches - made lightning fast with Silver Searcher -* vim-markdown-preview - :Mm to view your README.md as html -* html-escape - ,he and ,hu to escape and unescape html -* Gundo - visualize your undos - pretty amazing plugin. Hit ,u with my keymappings to trigger it, very user friendly -* vim-indent-guides - visual indent guides, off by default -* color_highlight - use :ColorCodes to see hex colors highlighted -* change-inside-surroundings - change content inside delimiters like quotes/brackets -* rspec.vim - used for color highlighting rspec correctly even if specs live outside of spec/ (rails.vim doesn't handle this) -* Ag - use :Ag to search across multiple files. Faster than Grep and Ack. -* vim-session: use `:SaveSession` and `:OpenSession` to come back to your saved window layout diff --git a/git/gitconfig b/git/gitconfig index 918bc5d..6428556 100644 --- a/git/gitconfig +++ b/git/gitconfig @@ -98,13 +98,9 @@ pretty = format:%C(blue)%ad%Creset %C(yellow)%h%C(green)%d%Creset %C(blue)%s %C(magenta) [%an]%Creset [mergetool] prompt = false -[mergetool "mvimdiff"] - cmd="mvim -c 'Gdiff' $MERGED" # use fugitive.vim for 3-way merge - keepbackup=false [merge] summary = true verbosity = 1 - tool = mvimdiff [apply] whitespace = nowarn [branch] @@ -115,7 +111,7 @@ default = upstream [core] autocrlf = false - editor = vim + editor = nano excludesfile = ~/.yadr/git/gitignore [advice] statusHints = false diff --git a/install.sh b/install.sh index 892a585..5cd6fa9 100755 --- a/install.sh +++ b/install.sh @@ -26,7 +26,7 @@ PERSONAL_FILES=( # Relative symlinks into .yadr/... — YADR's rake install creates equivalents, # but we deploy these too so things work even if rake install is skipped. .aprc .ctags .editrc .escaped_colors.rb .gemrc .gitconfig .inputrc .pryrc - .rdebugrc .unescaped_colors.rb .vim .vimrc .zlogin .zlogout .zpreztorc + .rdebugrc .unescaped_colors.rb .zlogin .zlogout .zpreztorc .zprofile .zshenv .zshrc ) @@ -77,7 +77,7 @@ cd "$YADR_DIR" log "Ensuring submodules are initialized" git submodule update --init --recursive -# 2. Run YADR's native install (Vim plugins, prezto, etc.) +# 2. Run YADR's native install (prezto, etc.) if have rake; then log "Running YADR rake install" [ "${1:-}" = "ask" ] && export ASK="true" diff --git a/vim/.gitignore b/vim/.gitignore deleted file mode 100644 index d174999..0000000 --- a/vim/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -tags -*~ -*.swp -.VimballRecord -view diff --git a/vim/after/plugin/vimrc_after.vim b/vim/after/plugin/vimrc_after.vim deleted file mode 100644 index 082178e..0000000 --- a/vim/after/plugin/vimrc_after.vim +++ /dev/null @@ -1,10 +0,0 @@ -" This loads after the yadr plugins so that plugin mappings can -" be overwritten. - -if filereadable(expand("~/.yadr/vim/after/.vimrc.after")) - source ~/.yadr/vim/after/.vimrc.after -endif - -if filereadable(expand("~/.vimrc.after")) - source ~/.vimrc.after -endif diff --git a/vim/ftplugin/gitcommit.vim b/vim/ftplugin/gitcommit.vim deleted file mode 100644 index a7dd4aa..0000000 --- a/vim/ftplugin/gitcommit.vim +++ /dev/null @@ -1,7 +0,0 @@ -if exists("b:did_ftplugin") - finish -endif - -let b:did_ftplugin = 1 " Don't load twice in one buffer - -setlocal spell diff --git a/vim/settings.vim b/vim/settings.vim deleted file mode 100644 index 81c3141..0000000 --- a/vim/settings.vim +++ /dev/null @@ -1,15 +0,0 @@ -let vimsettings = '~/.vim/settings' -let uname = system("uname -s") - -for fpath in split(globpath(vimsettings, '*.vim'), '\n') - - if (fpath == expand(vimsettings) . "/yadr-keymap-mac.vim") && uname[:4] ==? "linux" - continue " skip mac mappings for linux - endif - - if (fpath == expand(vimsettings) . "/yadr-keymap-linux.vim") && uname[:4] !=? "linux" - continue " skip linux mappings for mac - endif - - exe 'source' fpath -endfor diff --git a/vim/settings/NERDtree-tabs.vim b/vim/settings/NERDtree-tabs.vim deleted file mode 100644 index 205c48f..0000000 --- a/vim/settings/NERDtree-tabs.vim +++ /dev/null @@ -1,4 +0,0 @@ -" Auto open nerd tree on startup -let g:nerdtree_tabs_open_on_gui_startup = 0 -" Focus in the main content window -let g:nerdtree_tabs_focus_on_files = 1 diff --git a/vim/settings/NERDtree.vim b/vim/settings/NERDtree.vim deleted file mode 100644 index a79e9cc..0000000 --- a/vim/settings/NERDtree.vim +++ /dev/null @@ -1,4 +0,0 @@ -" Make nerdtree look nice -let NERDTreeMinimalUI = 1 -let NERDTreeDirArrows = 1 -let g:NERDTreeWinSize = 30 diff --git a/vim/settings/README.md b/vim/settings/README.md deleted file mode 100644 index 961db93..0000000 --- a/vim/settings/README.md +++ /dev/null @@ -1,9 +0,0 @@ -This directory contains settings for various vim plugins and vim itself. - -## Plugin Settings - -Each plugin's overrides/settings should be put in a separate file named `{plugin-name}.vim`. - -## Vim Settings - -General vim overrides/settings should be put in a separate file named `yadr-{descriptive-name}.vim`. diff --git a/vim/settings/abbr.vim b/vim/settings/abbr.vim deleted file mode 100644 index c33260b..0000000 --- a/vim/settings/abbr.vim +++ /dev/null @@ -1,9 +0,0 @@ -"Abbreviations, trigger by typing the abbreviation and hitting space - -abbr rlb Rails.logger.banner -abbr rld Rails.logger.debug -abbr pry! require 'pry'; binding.pry -abbr cl! console.log( ) - -" Rspec Before -abbr rbf before { } diff --git a/vim/settings/ag.vim b/vim/settings/ag.vim deleted file mode 100644 index a6dcd27..0000000 --- a/vim/settings/ag.vim +++ /dev/null @@ -1,3 +0,0 @@ -" Open the Ag command and place the cursor into the quotes -nmap ,ag :Ag "" -nmap ,af :AgFile "" diff --git a/vim/settings/autotag.vim b/vim/settings/autotag.vim deleted file mode 100644 index 342dff4..0000000 --- a/vim/settings/autotag.vim +++ /dev/null @@ -1,3 +0,0 @@ -" AutoTag -" Seems to have problems with some vim files -let g:autotagExcludeSuffixes="tml.xml.text.txt.vim" diff --git a/vim/settings/camelcasemotion.vim b/vim/settings/camelcasemotion.vim deleted file mode 100644 index 2f6784b..0000000 --- a/vim/settings/camelcasemotion.vim +++ /dev/null @@ -1,7 +0,0 @@ -map W CamelCaseMotion_w -map B CamelCaseMotion_b -map E CamelCaseMotion_e - -sunmap W -sunmap B -sunmap E \ No newline at end of file diff --git a/vim/settings/ctrlp.vim b/vim/settings/ctrlp.vim deleted file mode 100644 index 04e4de8..0000000 --- a/vim/settings/ctrlp.vim +++ /dev/null @@ -1,57 +0,0 @@ -if exists("g:ctrlp_user_command") - unlet g:ctrlp_user_command -endif -if executable('ag') - " Use ag in CtrlP for listing files. Lightning fast and respects .gitignore - let g:ctrlp_user_command = - \ 'ag %s --files-with-matches -g "" --ignore "\.git$\|\.hg$\|\.svn$"' - - " ag is fast enough that CtrlP doesn't need to cache - let g:ctrlp_use_caching = 0 -else - " Fall back to using git ls-files if Ag is not available - let g:ctrlp_custom_ignore = '\.git$\|\.hg$\|\.svn$' - let g:ctrlp_user_command = ['.git', 'cd %s && git ls-files . --cached --exclude-standard --others'] -endif - -" Default to filename searches - so that appctrl will find application -" controller -let g:ctrlp_by_filename = 1 - -" Don't jump to already open window. This is annoying if you are maintaining -" several Tab workspaces and want to open two windows into the same file. -let g:ctrlp_switch_buffer = 0 - -" We don't want to use Ctrl-p as the mapping because -" it interferes with YankRing (paste, then hit ctrl-p) -let g:ctrlp_map = ',t' -nnoremap ,t :CtrlP - -" Additional mapping for buffer search -nnoremap ,b :CtrlPBuffer - -" Cmd-Shift-P to clear the cache -nnoremap :ClearCtrlPCache - -" Idea from : http://www.charlietanksley.net/blog/blog/2011/10/18/vim-navigation-with-lustyexplorer-and-lustyjuggler/ -" Open CtrlP starting from a particular path, making it much -" more likely to find the correct thing first. mnemonic 'jump to [something]' -map ,ja :CtrlP app/assets -map ,jm :CtrlP app/models -map ,jc :CtrlP app/controllers -map ,jv :CtrlP app/views -map ,jj :CtrlP app/assets/javascripts -map ,jh :CtrlP app/helpers -map ,jl :CtrlP lib -map ,jp :CtrlP public -map ,js :CtrlP spec -map ,jf :CtrlP fast_spec -map ,jd :CtrlP db -map ,jC :CtrlP config -map ,jV :CtrlP vendor -map ,jF :CtrlP factories -map ,jT :CtrlP test - -"Cmd-Shift-(M)ethod - jump to a method (tag in current file) -"Ctrl-m is not good - it overrides behavior of Enter -nnoremap :CtrlPBufTag diff --git a/vim/settings/easymotion.vim b/vim/settings/easymotion.vim deleted file mode 100644 index a7d4821..0000000 --- a/vim/settings/easymotion.vim +++ /dev/null @@ -1,8 +0,0 @@ -" These keys are easier to type than the default set -" We exclude semicolon because it's hard to read and -" i and l are too easy to mistake for each other slowing -" down recognition. The home keys and the immediate keys -" accessible by middle fingers are available -let g:EasyMotion_keys='asdfjkoweriop' -nmap , ,,w -nmap , ,,b diff --git a/vim/settings/es6.vim b/vim/settings/es6.vim deleted file mode 100644 index a8fa867..0000000 --- a/vim/settings/es6.vim +++ /dev/null @@ -1,2 +0,0 @@ -" Automatically treat .es6 extension files as javascript -autocmd BufRead,BufNewFile *.es6 setfiletype javascript diff --git a/vim/settings/fugitive.vim b/vim/settings/fugitive.vim deleted file mode 100644 index 37bc74c..0000000 --- a/vim/settings/fugitive.vim +++ /dev/null @@ -1,5 +0,0 @@ -" fugitive.git -" ======================================== -" For fugitive.git, dp means :diffput. Define dg to mean :diffget -nnoremap ,dg :diffget -nnoremap ,dp :diffput diff --git a/vim/settings/gh-markdown.vim b/vim/settings/gh-markdown.vim deleted file mode 100644 index 99d037e..0000000 --- a/vim/settings/gh-markdown.vim +++ /dev/null @@ -1,6 +0,0 @@ -" Support for github flavored markdown -" via https://github.com/jtratner/vim-flavored-markdown -augroup markdown - au! - au BufNewFile,BufRead *.md,*.markdown setlocal filetype=ghmarkdown -augroup END diff --git a/vim/settings/gotofile.vim b/vim/settings/gotofile.vim deleted file mode 100644 index f2e7526..0000000 --- a/vim/settings/gotofile.vim +++ /dev/null @@ -1,6 +0,0 @@ -" Automatically jump to a file at the correct line number -" i.e. if your cursor is over /some/path.rb:50 then using 'gf' on it will take -" you to that line - -" use ,gf to go to file in a vertical split -nnoremap ,gf :vertical botright wincmd F diff --git a/vim/settings/grep.vim b/vim/settings/grep.vim deleted file mode 100644 index 08c7fd0..0000000 --- a/vim/settings/grep.vim +++ /dev/null @@ -1,3 +0,0 @@ -"Use the silver searcher for lightning fast Gsearch command -set grepprg=git\ grep -let g:grep_cmd_opts = '--line-number' diff --git a/vim/settings/gundo.vim b/vim/settings/gundo.vim deleted file mode 100644 index bba1781..0000000 --- a/vim/settings/gundo.vim +++ /dev/null @@ -1,7 +0,0 @@ -nmap ,u :GundoToggle - -" open on the right so as not to compete with the nerdtree -let g:gundo_right = 1 - -" a little wider for wider screens -let g:gundo_width = 60 diff --git a/vim/settings/iterm-rspec.vim b/vim/settings/iterm-rspec.vim deleted file mode 100644 index 032aee8..0000000 --- a/vim/settings/iterm-rspec.vim +++ /dev/null @@ -1,6 +0,0 @@ -nnoremap ,rs :RunItermSpec -nnoremap ,rl :RunItermSpecLine -nnoremap ,ss :RunItermSpringSpec -nnoremap ,sl :RunItermSpringSpecLine -nnoremap zl :RunItermZeusSpecLine -nnoremap zs :RunItermZeusSpec diff --git a/vim/settings/lightline.vim b/vim/settings/lightline.vim deleted file mode 100644 index 892f509..0000000 --- a/vim/settings/lightline.vim +++ /dev/null @@ -1,40 +0,0 @@ -let g:lightline = { - \ 'colorscheme': 'solarized', - \ 'active': { - \ 'left': [ [ 'mode', 'paste' ], - \ [ 'fugitive', 'readonly', 'filename', 'modified' ] ] - \ }, - \ 'component_function': { - \ 'fugitive': 'MyFugitive', - \ 'readonly': 'MyReadonly', - \ 'filename': 'MyFilename', - \ }, - \ 'separator': { 'left': '⮀', 'right': '⮂' }, - \ 'subseparator': { 'left': '⮁', 'right': '⮃' } - \ } - -function! MyReadonly() - if &filetype == "help" - return "" - elseif &readonly - return "⭤ " - else - return "" - endif -endfunction - -function! MyFugitive() - if exists("*fugitive#head") - let _ = fugitive#head() - return strlen(_) ? '⭠ '._ : '' - endif - return '' -endfunction - -function! MyFilename() - return ('' != MyReadonly() ? MyReadonly() . ' ' : '') . - \ ('' != expand('%') ? expand('%') : '[NoName]') -endfunction - -" Use status bar even with single buffer -set laststatus=2 diff --git a/vim/settings/neocomplete.vim b/vim/settings/neocomplete.vim deleted file mode 100644 index 6701123..0000000 --- a/vim/settings/neocomplete.vim +++ /dev/null @@ -1,34 +0,0 @@ -" neocomplete -" Next generation completion framework. - -let g:acp_enableAtStartup = 0 -let g:neocomplete#enable_at_startup = 1 -let g:neocomplete#enable_camel_case = 1 -let g:neocomplete#enable_smart_case = 1 - -" Default # of completions is 100, that's crazy. -let g:neocomplete#max_list = 5 - -" Set minimum syntax keyword length. -let g:neocomplete#auto_completion_start_length = 3 - -" Map standard Ctrl-N completion to Ctrl-Space -inoremap - -" This makes sure we use neocomplete completefunc instead of -" the one in rails.vim, otherwise this plugin will crap out. -let g:neocomplete#force_overwrite_completefunc = 1 - -" Define keyword. -if !exists('g:neocomplete#keyword_patterns') - let g:neocomplete#keyword_patterns = {} -endif -let g:neocomplete#keyword_patterns['default'] = '\h\w*' - -" Enable omni completion. -autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS -autocmd FileType html,markdown setlocal omnifunc=htmlcomplete#CompleteTags -autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS -autocmd FileType python setlocal omnifunc=pythoncomplete#Complete -autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags -autocmd FileType ruby setlocal omnifunc=rubycomplete#Complete diff --git a/vim/settings/next-textobject.vim b/vim/settings/next-textobject.vim deleted file mode 100644 index 836d8f6..0000000 --- a/vim/settings/next-textobject.vim +++ /dev/null @@ -1,136 +0,0 @@ -" Stolen from Steve Losh -" https://github.com/sjl/dotfiles/blob/master/vim/vimrc#L1380 -" -" Motion for "next/last object". "Last" here means "previous", not "final". -" Unfortunately the "p" motion was already taken for paragraphs. -" -" Next acts on the next object of the given type, last acts on the previous -" object of the given type. These don't necessarily have to be in the current -" line. -" -" Currently works for (, [, {, and their shortcuts b, r, B. -" -" Next kind of works for ' and " as long as there are no escaped versions of -" them in the string (TODO: fix that). Last is currently broken for quotes -" (TODO: fix that). -" -" Some examples (C marks cursor positions, V means visually selected): -" -" din' -> delete in next single quotes foo = bar('spam') -" C -" foo = bar('') -" C -" -" canb -> change around next parens foo = bar('spam') -" C -" foo = bar -" C -" -" vin" -> select inside next double quotes print "hello ", name -" C -" print "hello ", name -" VVVVVV - -onoremap an :call NextTextObject('a', '/') -xnoremap an :call NextTextObject('a', '/') -onoremap in :call NextTextObject('i', '/') -xnoremap in :call NextTextObject('i', '/') - -onoremap al :call NextTextObject('a', '?') -xnoremap al :call NextTextObject('a', '?') -onoremap il :call NextTextObject('i', '?') -xnoremap il :call NextTextObject('i', '?') - - -function! s:NextTextObject(motion, dir) - let c = nr2char(getchar()) - let d = '' - - if c ==# "b" || c ==# "(" || c ==# ")" - let c = "(" - elseif c ==# "B" || c ==# "{" || c ==# "}" - let c = "{" - elseif c ==# "r" || c ==# "[" || c ==# "]" - let c = "[" - elseif c ==# "'" - let c = "'" - elseif c ==# '"' - let c = '"' - else - return - endif - - " Find the next opening-whatever. - execute "normal! " . a:dir . c . "\" - - if a:motion ==# 'a' - " If we're doing an 'around' method, we just need to select around it - " and we can bail out to Vim. - execute "normal! va" . c - else - " Otherwise we're looking at an 'inside' motion. Unfortunately these - " get tricky when you're dealing with an empty set of delimiters because - " Vim does the wrong thing when you say vi(. - - let open = '' - let close = '' - - if c ==# "(" - let open = "(" - let close = ")" - elseif c ==# "{" - let open = "{" - let close = "}" - elseif c ==# "[" - let open = "\\[" - let close = "\\]" - elseif c ==# "'" - let open = "'" - let close = "'" - elseif c ==# '"' - let open = '"' - let close = '"' - endif - - " We'll start at the current delimiter. - let start_pos = getpos('.') - let start_l = start_pos[1] - let start_c = start_pos[2] - - " Then we'll find it's matching end delimiter. - if c ==# "'" || c ==# '"' - " searchpairpos() doesn't work for quotes, because fuck me. - let end_pos = searchpos(open) - else - let end_pos = searchpairpos(open, '', close) - endif - - let end_l = end_pos[0] - let end_c = end_pos[1] - - call setpos('.', start_pos) - - if start_l == end_l && start_c == (end_c - 1) - " We're in an empty set of delimiters. We'll append an "x" - " character and select that so most Vim commands will do something - " sane. v is gonna be weird, and so is y. Oh well. - execute "normal! ax\\" - execute "normal! vi" . c - elseif start_l == end_l && start_c == (end_c - 2) - " We're on a set of delimiters that contain a single, non-newline - " character. We can just select that and we're done. - execute "normal! vi" . c - else - " Otherwise these delimiters contain something. But we're still not - " sure Vim's gonna work, because if they contain nothing but - " newlines Vim still does the wrong thing. So we'll manually select - " the guts ourselves. - let whichwrap = &whichwrap - set whichwrap+=h,l - - execute "normal! va" . c . "hol" - - let &whichwrap = whichwrap - endif - endif -endfunction diff --git a/vim/settings/open-changed-files.vim b/vim/settings/open-changed-files.vim deleted file mode 100644 index c5e0599..0000000 --- a/vim/settings/open-changed-files.vim +++ /dev/null @@ -1,20 +0,0 @@ -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -" OpenChangedFiles COMMAND -" Open a split for each dirty file in git -" -" Shamelessly stolen from Gary Bernhardt: https://github.com/garybernhardt/dotfiles -"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -function! OpenChangedFiles() - only " Close all windows, unless they're modified - let status = system('git status -s | grep "^ \?\(M\|A\)" | cut -d " " -f 3') - let filenames = split(status, "\n") - if len(filenames) > 0 - exec "edit " . filenames[0] - for filename in filenames[1:] - exec "sp " . filename - endfor - end -endfunction -command! OpenChangedFiles :call OpenChangedFiles() - -nnoremap ,ocf :OpenChangedFiles diff --git a/vim/settings/outerblock.vim b/vim/settings/outerblock.vim deleted file mode 100644 index bc65559..0000000 --- a/vim/settings/outerblock.vim +++ /dev/null @@ -1,13 +0,0 @@ -" Navigate to the block surrounding this one -" For example if you're inside -" foo do -" bar do -" # you are here -" end -" end -" -" Then hitting ,orb ("outer ruby block") will take you to 'foo do' -" -" This is relying on the textobj-rubyblock which gives us 'ar' around ruby -" and matchit.vim which gives us jumping to the matching -nnoremap ,orb :normal varar% diff --git a/vim/settings/path.vim b/vim/settings/path.vim deleted file mode 100644 index 18bba7a..0000000 --- a/vim/settings/path.vim +++ /dev/null @@ -1,11 +0,0 @@ -" Set the shell to bash so we inherit its path, to make sure -" we inherit its path. This affects :Rtags finding the right -" path to homebrewed ctags rather than the XCode version of ctags -" -" Use login Shell instead of interactive shell to avoid -" vimdiff suspended at startup -if has("gui_running") - set shell=bash\ -i -else - set shell=bash\ -l -endif diff --git a/vim/settings/quickfix-search.vim b/vim/settings/quickfix-search.vim deleted file mode 100644 index a1d6414..0000000 --- a/vim/settings/quickfix-search.vim +++ /dev/null @@ -1,6 +0,0 @@ -" Stolen from Steve Losh vimrc: https://bitbucket.org/sjl/dotfiles/src/tip/vim/.vimrc -" Open a Quickfix window for the last search. -nnoremap q/ :execute 'vimgrep /'.@/.'/g %':copen - -" Ag for the last search. -nnoremap qa/ :execute "Ag! '" . substitute(substitute(substitute(@/, "\\\\<", "\\\\b", ""), "\\\\>", "\\\\b", ""), "\\\\v", "", "") . "'" diff --git a/vim/settings/rails.vim b/vim/settings/rails.vim deleted file mode 100644 index 7d47fe9..0000000 --- a/vim/settings/rails.vim +++ /dev/null @@ -1,3 +0,0 @@ -" Better key maps for switching between controller and view -nnoremap ,vv :Eview -nnoremap ,cc :Econtroller diff --git a/vim/settings/rspec.vim b/vim/settings/rspec.vim deleted file mode 100644 index da92d2b..0000000 --- a/vim/settings/rspec.vim +++ /dev/null @@ -1,29 +0,0 @@ -" Does not work on pending 'blocks', only single lines -" -" Given: -" it "foo bar" do -" pending("bla bla" -" -" Produce: -" xit "foo bar" do -" -function! ChangePendingRspecToXit() - " Find the next occurrence of pending - while(search("pending(") > 0) - " Delete it - normal dd - " Search backwards to the it block - ?it\s - " add an 'x' to the 'it' to make it 'xit' - normal ix - endwhile -endfunction - -nnoremap ,rxit :call ChangePendingRspecToXit() - -" insert a before { } block around a line -nnoremap \bf ^ibefore { $a } - -" insert a specify { } block around a line -nnoremap \sp ^ispecify { $a } - diff --git a/vim/settings/search.vim b/vim/settings/search.vim deleted file mode 100644 index 82cf075..0000000 --- a/vim/settings/search.vim +++ /dev/null @@ -1,30 +0,0 @@ -function! GetVisual() - let reg_save = getreg('"') - let regtype_save = getregtype('"') - let cb_save = &clipboard - set clipboard& - normal! ""gvy - let selection = getreg('"') - call setreg('"', reg_save, regtype_save) - let &clipboard = cb_save - return selection -endfunction - -"grep the current word using ,k (mnemonic Kurrent) -nnoremap ,k :Ag - -"grep visual selection -vnoremap ,k :execute "Ag " . GetVisual() - -"grep current word up to the next exclamation point using ,K -nnoremap ,K viwf!:execute "Ag " . GetVisual() - -"grep for 'def foo' -nnoremap ,gd :Ag 'def ' - -",gg = Grep! - using Ag the silver searcher -" open up a grep line, with a quote started for the search -nnoremap ,gg :Ag "" - -"Grep for usages of the current file -nnoremap ,gcf :exec "Ag " . expand("%:t:r") diff --git a/vim/settings/showmarks.vim b/vim/settings/showmarks.vim deleted file mode 100644 index c844c53..0000000 --- a/vim/settings/showmarks.vim +++ /dev/null @@ -1,2 +0,0 @@ -" Tell showmarks to not include the various brace marks (),{}, etc -let g:showmarks_include = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXY" diff --git a/vim/settings/smart_jump_to_tag.vim b/vim/settings/smart_jump_to_tag.vim deleted file mode 100644 index e0609c9..0000000 --- a/vim/settings/smart_jump_to_tag.vim +++ /dev/null @@ -1,6 +0,0 @@ -" hit ,f to find the definition of the current class -" this uses ctags. the standard way to get this is Ctrl-] -nnoremap ,f - -" use ,F to jump to tag in a vertical split -nnoremap ,F :let word=expand(""):vsp:wincmd w:exec("tag ". word) diff --git a/vim/settings/sneak.vim b/vim/settings/sneak.vim deleted file mode 100644 index 7e634c2..0000000 --- a/vim/settings/sneak.vim +++ /dev/null @@ -1 +0,0 @@ -nmap SneakForward diff --git a/vim/settings/snipmate.vim b/vim/settings/snipmate.vim deleted file mode 100644 index 701053b..0000000 --- a/vim/settings/snipmate.vim +++ /dev/null @@ -1,2 +0,0 @@ -" Explicitly set g:snipMate.snippet_version to remove start up message -let g:snipMate = { 'snippet_version' : 0 } diff --git a/vim/settings/solarized.vim b/vim/settings/solarized.vim deleted file mode 100644 index 7bc14d2..0000000 --- a/vim/settings/solarized.vim +++ /dev/null @@ -1,77 +0,0 @@ -if !exists("g:yadr_disable_solarized_enhancements") - hi! link txtBold Identifier - hi! link zshVariableDef Identifier - hi! link zshFunction Function - hi! link rubyControl Statement - hi! link rspecGroupMethods rubyControl - hi! link rspecMocks Identifier - hi! link rspecKeywords Identifier - hi! link rubyLocalVariableOrMethod Normal - hi! link rubyStringDelimiter Constant - hi! link rubyString Constant - hi! link rubyAccess Todo - hi! link rubySymbol Identifier - hi! link rubyPseudoVariable Type - hi! link rubyRailsARAssociationMethod Title - hi! link rubyRailsARValidationMethod Title - hi! link rubyRailsMethod Title - hi! link rubyDoBlock Normal - hi! link MatchParen DiffText - - hi! link CTagsModule Type - hi! link CTagsClass Type - hi! link CTagsMethod Identifier - hi! link CTagsSingleton Identifier - - hi! link javascriptFuncName Type - hi! link jsFuncCall jsFuncName - hi! link javascriptFunction Statement - hi! link javascriptThis Statement - hi! link javascriptParens Normal - hi! link jOperators javascriptStringD - hi! link jId Title - hi! link jClass Title - - " Javascript language support - hi! link javascriptJGlobalMethod Statement - - " Make the braces and other noisy things slightly less noisy - hi! jsParens guifg=#005F78 cterm=NONE term=NONE ctermfg=NONE ctermbg=NONE - hi! link jsFuncParens jsParens - hi! link jsFuncBraces jsParens - hi! link jsBraces jsParens - hi! link jsParens jsParens - hi! link jsNoise jsParens - - hi! link NERDTreeFile Constant - hi! link NERDTreeDir Identifier - - hi! link sassMixinName Function - hi! link sassDefinition Function - hi! link sassProperty Type - hi! link htmlTagName Type - - hi! PreProc gui=bold - - " Solarized separators are a little garish. - " This moves separators, comments, and normal - " text into the same color family as the background. - " Using the http://drpeterjones.com/colorcalc/, - " they are now just differently saturated and - " valued riffs on the background color, making - " everything play together just a little more nicely. - hi! VertSplit guifg=#003745 cterm=NONE term=NONE ctermfg=NONE ctermbg=NONE - hi! LineNR guifg=#004C60 gui=bold guibg=#002B36 ctermfg=146 - hi! link NonText VertSplit - hi! Normal guifg=#77A5B1 - hi! Constant guifg=#00BCE0 - hi! Comment guifg=#52737B - hi! link htmlLink Include - hi! CursorLine cterm=NONE gui=NONE - hi! Visual ctermbg=233 - hi! Type gui=bold - hi! EasyMotionTarget ctermfg=100 guifg=#4CE660 gui=bold - - " Make sure this file loads itself on top of any other color settings - au VimEnter * so ~/.vim/settings/solarized.vim -endif diff --git a/vim/settings/surround.vim b/vim/settings/surround.vim deleted file mode 100644 index 1a0800b..0000000 --- a/vim/settings/surround.vim +++ /dev/null @@ -1,12 +0,0 @@ -" via: http://whynotwiki.com/Vim -" Ruby -" Use v or # to get a variable interpolation (inside of a string)} -" ysiw# Wrap the token under the cursor in #{} -" v...s# Wrap the selection in #{} -let g:surround_113 = "#{\r}" " v -let g:surround_35 = "#{\r}" " # - -" Select text in an ERb file with visual mode and then press s- or s= -" Or yss- to do entire line. -let g:surround_45 = "<% \r %>" " - -let g:surround_61 = "<%= \r %>" " = diff --git a/vim/settings/syntastic.vim b/vim/settings/syntastic.vim deleted file mode 100644 index 6cdb90d..0000000 --- a/vim/settings/syntastic.vim +++ /dev/null @@ -1,27 +0,0 @@ -"mark syntax errors with :signs -let g:syntastic_enable_signs=1 -"automatically jump to the error when saving the file -let g:syntastic_auto_jump=0 -"show the error list automatically -let g:syntastic_auto_loc_list=1 -"don't care about warnings -let g:syntastic_quiet_messages = {'level': 'warnings'} - -" Default to eslint. If you need jshint, you can override this in -" ~/.vimrc.after -let g:syntastic_javascript_checkers = ['eslint'] - -" I have no idea why this is not working, as it used to -" be a part of syntastic code but was apparently removed -" This will make syntastic find the correct ruby specified by mri -function! s:FindRubyExec() - if executable("rvm") - return system("rvm tools identifier") - endif - - return "ruby" -endfunction - -if !exists("g:syntastic_ruby_exec") - let g:syntastic_ruby_exec = s:FindRubyExec() -endif diff --git a/vim/settings/tComment.vim b/vim/settings/tComment.vim deleted file mode 100644 index ddfd078..0000000 --- a/vim/settings/tComment.vim +++ /dev/null @@ -1,8 +0,0 @@ -" tComment -" ======================================== -" extensions for tComment plugin. Normally -" tComment maps 'gcc' to comment current line -" this adds 'gcp' comment current paragraph (block) -" using tComment's built in p mapping -nmap gcp p - diff --git a/vim/settings/tidy.vim b/vim/settings/tidy.vim deleted file mode 100644 index 360a0d0..0000000 --- a/vim/settings/tidy.vim +++ /dev/null @@ -1 +0,0 @@ -:vmap ,gt :!tidy -q -i --show-errors 0 diff --git a/vim/settings/unimpaired.vim b/vim/settings/unimpaired.vim deleted file mode 100644 index f0cca4a..0000000 --- a/vim/settings/unimpaired.vim +++ /dev/null @@ -1,10 +0,0 @@ -" https://github.com/carlhuda/janus/blob/master/vimrc - -" Unimpaired configuration -" Bubble single lines -nmap [e -nmap ]e - -" Bubble multiple lines -vmap [egv -vmap ]egv diff --git a/vim/settings/vim-fugitive.vim b/vim/settings/vim-fugitive.vim deleted file mode 100644 index 04d5073..0000000 --- a/vim/settings/vim-fugitive.vim +++ /dev/null @@ -1,15 +0,0 @@ -" The tree buffer makes it easy to drill down through the directories of your -" git repository, but it’s not obvious how you could go up a level to the -" parent directory. Here’s a mapping of .. to the above command, but -" only for buffers containing a git blob or tree -autocmd User fugitive - \ if get(b:, 'fugitive_type', '') =~# '^\%(tree\|blob\)$' | - \ nnoremap .. :edit %:h | - \ endif - -" Every time you open a git object using fugitive it creates a new buffer. -" This means that your buffer listing can quickly become swamped with -" fugitive buffers. This prevents this from becomming an issue: - -autocmd BufReadPost fugitive://* set bufhidden=delete - diff --git a/vim/settings/vim-indent-guides.vim b/vim/settings/vim-indent-guides.vim deleted file mode 100644 index 79473f8..0000000 --- a/vim/settings/vim-indent-guides.vim +++ /dev/null @@ -1,3 +0,0 @@ -let g:indent_guides_auto_colors = 1 -let g:indent_guides_start_level = 2 -let g:indent_guides_guide_size = 1 diff --git a/vim/settings/vim-multiple-cursors.vim b/vim/settings/vim-multiple-cursors.vim deleted file mode 100644 index aeb01ee..0000000 --- a/vim/settings/vim-multiple-cursors.vim +++ /dev/null @@ -1,13 +0,0 @@ -" Turn off default key mappings -let g:multi_cursor_use_default_mapping=0 - -" Switch to multicursor mode with ,mc -let g:multi_cursor_start_key=',mc' - -" Ctrl-n, Ctrl-p, Ctrl-x, and are mapped in the special multicursor -" mode once you've added at least one virtual cursor to the buffer -let g:multi_cursor_next_key='' -let g:multi_cursor_prev_key='' -let g:multi_cursor_skip_key='' -let g:multi_cursor_quit_key='' - diff --git a/vim/settings/vim-session.vim b/vim/settings/vim-session.vim deleted file mode 100644 index aed4bc0..0000000 --- a/vim/settings/vim-session.vim +++ /dev/null @@ -1,4 +0,0 @@ -" Prevent vim-session from asking us to load the session. -" If you want to load the session, use :SaveSession and :OpenSession -let g:session_autosave = 'no' -let g:session_autoload = 'no' diff --git a/vim/settings/vim-tmux-navigator.vim b/vim/settings/vim-tmux-navigator.vim deleted file mode 100644 index ead6707..0000000 --- a/vim/settings/vim-tmux-navigator.vim +++ /dev/null @@ -1,10 +0,0 @@ -" Don't allow any default key-mappings. -let g:tmux_navigator_no_mappings = 1 - -" Re-enable tmux_navigator.vim default bindings, minus . -" conflicts with NERDTree "current file". - -nnoremap :TmuxNavigateLeft -nnoremap :TmuxNavigateDown -nnoremap :TmuxNavigateUp -nnoremap :TmuxNavigateRight diff --git a/vim/settings/yadr-appearance.vim b/vim/settings/yadr-appearance.vim deleted file mode 100644 index ccf0ab5..0000000 --- a/vim/settings/yadr-appearance.vim +++ /dev/null @@ -1,31 +0,0 @@ -" Make it beautiful - colors and fonts - -if has("gui_running") - "tell the term has 256 colors - set t_Co=256 - - " Show tab number (useful for Cmd-1, Cmd-2.. mapping) - " For some reason this doesn't work as a regular set command, - " (the numbers don't show up) so I made it a VimEnter event - autocmd VimEnter * set guitablabel=%N:\ %t\ %M - - set lines=60 - set columns=190 - - if has("gui_gtk2") - set guifont=Inconsolata\ XL\ 12,Inconsolata\ 15,Monaco\ 12 - else - set guifont=Inconsolata\ XL:h17,Inconsolata:h20,Monaco:h17 - end -else - let g:CSApprox_loaded = 1 - - " For people using a terminal that is not Solarized - if exists("g:yadr_using_unsolarized_terminal") - let g:solarized_termcolors=256 - let g:solarized_termtrans=1 - end -endif - -colorscheme solarized -set background=dark diff --git a/vim/settings/yadr-guioptions.vim b/vim/settings/yadr-guioptions.vim deleted file mode 100644 index 28a8617..0000000 --- a/vim/settings/yadr-guioptions.vim +++ /dev/null @@ -1,6 +0,0 @@ -" Disable the scrollbars (NERDTree) -set guioptions-=r -set guioptions-=L - -" Disable the macvim toolbar -set guioptions-=T diff --git a/vim/settings/yadr-keymap-linux.vim b/vim/settings/yadr-keymap-linux.vim deleted file mode 100644 index 3205b09..0000000 --- a/vim/settings/yadr-keymap-linux.vim +++ /dev/null @@ -1,75 +0,0 @@ -" ======================================== -" Linux specific General vim sanity improvements -" ======================================== -" -" ======================================== -" RSI Prevention - keyboard remaps -" ======================================== -" Certain things we do every day as programmers stress -" out our hands. For example, typing underscores and -" dashes are very common, and in position that require -" a lot of hand movement. Vim to the rescue -" -" Now using the middle finger of either hand you can type -" underscores with Alt-k or Alt-d, and add Shift -" to type dashes -imap _ -imap _ -imap - -imap - - -" Change inside various enclosures with Alt-" and Alt-' -" The f makes it find the enclosure so you don't have -" to be standing inside it -nnoremap f'ci' -nnoremap f"ci" -nnoremap f(ci( -nnoremap f)ci) -nnoremap f[ci[ -nnoremap f]ci] - -" ==== NERD tree -" Alt-Shift-N for nerd tree -nmap :NERDTreeToggle - -" move up/down quickly by using Alt-j, Alt-k -" which will move us around by functions -nnoremap } -nnoremap { -autocmd FileType ruby map ]m -autocmd FileType ruby map [m -autocmd FileType rspec map } -autocmd FileType rspec map { -autocmd FileType javascript map } -autocmd FileType javascript map { - -" Command-/ to toggle comments -map :TComment -imap :TCommenti - -" Use Alt- numbers to pick the tab you want -map :tabn 1 -map :tabn 2 -map :tabn 3 -map :tabn 4 -map :tabn 5 -map :tabn 6 -map :tabn 7 -map :tabn 8 -map :tabn 9 - -" Resize windows with arrow keys -nnoremap + -nnoremap - -nnoremap < -nnoremap > - -" ============================ -" Tabularize - alignment -" ============================ -" Hit Alt-Shift-A then type a character you want to align by -nmap :Tabularize / -vmap :Tabularize / - -" Source current file Alt-% (good for vim development) -map :so % diff --git a/vim/settings/yadr-keymap-mac.vim b/vim/settings/yadr-keymap-mac.vim deleted file mode 100644 index a351a4a..0000000 --- a/vim/settings/yadr-keymap-mac.vim +++ /dev/null @@ -1,75 +0,0 @@ -" ======================================== -" Mac specific General vim sanity improvements -" ======================================== -" -" ======================================== -" RSI Prevention - keyboard remaps -" ======================================== -" Certain things we do every day as programmers stress -" out our hands. For example, typing underscores and -" dashes are very common, and in position that require -" a lot of hand movement. Vim to the rescue -" -" Now using the middle finger of either hand you can type -" underscores with apple-k or apple-d, and add Shift -" to type dashes -imap _ -imap _ -imap - -imap - - -" Change inside various enclosures with Cmd-" and Cmd-' -" The f makes it find the enclosure so you don't have -" to be standing inside it -nnoremap f'ci' -nnoremap f"ci" -nnoremap f(ci( -nnoremap f)ci) -nnoremap f[ci[ -nnoremap f]ci] - -" ==== NERD tree -" Cmd-Shift-N for nerd tree -nmap :NERDTreeToggle - -" move up/down quickly by using Cmd-j, Cmd-k -" which will move us around by functions -nnoremap } -nnoremap { -autocmd FileType ruby map ]m -autocmd FileType ruby map [m -autocmd FileType rspec map } -autocmd FileType rspec map { -autocmd FileType javascript map } -autocmd FileType javascript map { - -" Command-/ to toggle comments -map :TComment -imap :TCommenti - -" Use numbers to pick the tab you want (like iTerm) -map :tabn 1 -map :tabn 2 -map :tabn 3 -map :tabn 4 -map :tabn 5 -map :tabn 6 -map :tabn 7 -map :tabn 8 -map :tabn 9 - -" Resize windows with arrow keys -nnoremap + -nnoremap - -nnoremap < -nnoremap > - -" ============================ -" Tabularize - alignment -" ============================ -" Hit Cmd-Shift-A then type a character you want to align by -nmap :Tabularize / -vmap :Tabularize / - -" Source current file Cmd-% (good for vim development) -map :so % diff --git a/vim/settings/yadr-keymap.vim b/vim/settings/yadr-keymap.vim deleted file mode 100644 index d6ee932..0000000 --- a/vim/settings/yadr-keymap.vim +++ /dev/null @@ -1,172 +0,0 @@ -" ======================================== -" General vim sanity improvements -" ======================================== -" -" -" alias yw to yank the entire word 'yank inner word' -" even if the cursor is halfway inside the word -" FIXME: will not properly repeat when you use a dot (tie into repeat.vim) -nnoremap ,yw yiww - -" ,ow = 'overwrite word', replace a word with what's in the yank buffer -" FIXME: will not properly repeat when you use a dot (tie into repeat.vim) -nnoremap ,ow "_diwhp - -"make Y consistent with C and D -nnoremap Y y$ -function! YRRunAfterMaps() - nnoremap Y :YRYankCount 'y$' -endfunction - -" Make 0 go to the first character rather than the beginning -" of the line. When we're programming, we're almost always -" interested in working with text rather than empty space. If -" you want the traditional beginning of line, use ^ -nnoremap 0 ^ -nnoremap ^ 0 - -" ,# Surround a word with #{ruby interpolation} -map ,# ysiw# -vmap ,# c#{"} - -" ," Surround a word with "quotes" -map ," ysiw" -vmap ," c""" - -" ,' Surround a word with 'single quotes' -map ,' ysiw' -vmap ,' c'"' - -" ,) or ,( Surround a word with (parens) -" The difference is in whether a space is put in -map ,( ysiw( -map ,) ysiw) -vmap ,( c( " ) -vmap ,) c(") - -" ,[ Surround a word with [brackets] -map ,] ysiw] -map ,[ ysiw[ -vmap ,[ c[ " ] -vmap ,] c["] - -" ,{ Surround a word with {braces} -map ,} ysiw} -map ,{ ysiw{ -vmap ,} c{ " } -vmap ,{ c{"} - -map ,` ysiw` - -" gary bernhardt's hashrocket -imap => - -"Go to last edit location with ,. -nnoremap ,. '. - -"When typing a string, your quotes auto complete. Move past the quote -"while still in insert mode by hitting Ctrl-a. Example: -" -" type 'foo -" -" the first quote will autoclose so you'll get 'foo' and hitting will -" put the cursor right after the quote -imap wa - -" ==== NERD tree -" Open the project tree and expose current file in the nerdtree with Ctrl-\ -" " calls NERDTreeFind iff NERDTree is active, current window contains a modifiable file, and we're not in vimdiff -function! OpenNerdTree() - if &modifiable && strlen(expand('%')) > 0 && !&diff - NERDTreeFind - else - NERDTreeToggle - endif -endfunction -nnoremap :call OpenNerdTree() - -" ,q to toggle quickfix window (where you have stuff like Ag) -" ,oq to open it back up (rare) -nmap ,qc :cclose -nmap ,qo :copen - -"Move back and forth through previous and next buffers -"with ,z and ,x -nnoremap ,z :bp -nnoremap ,x :bn - -" ============================== -" Window/Tab/Split Manipulation -" ============================== -" Move between split windows by using the four directions H, L, K, J -" NOTE: This has moved to vim/settings/vim-tmux-navigator.vim. -" nnoremap h -" nnoremap l -" nnoremap k -" nnoremap j - -" Make gf (go to file) create the file, if not existent -nnoremap f :sp +e -nnoremap gf :tabe - -" Zoom in -map ,gz o - -" Create window splits easier. The default -" way is Ctrl-w,v and Ctrl-w,s. I remap -" this to vv and ss -nnoremap vv v -nnoremap ss s - -" create <%= foo %> erb tags using Ctrl-k in edit mode -imap <%= %>3hi - -" create <%= foo %> erb tags using Ctrl-j in edit mode -imap <% %>2hi - -" ============================ -" Shortcuts for everyday tasks -" ============================ - -" copy current filename into system clipboard - mnemonic: (c)urrent(f)ilename -" this is helpful to paste someone the path you're looking at -nnoremap ,cf :let @* = expand("%:~") -nnoremap ,cr :let @* = expand("%") -nnoremap ,cn :let @* = expand("%:t") - -"Clear current search highlight by double tapping // -nmap // :nohlsearch - -"(v)im (c)ommand - execute current line as a vim command -nmap ,vc yy:p - -"(v)im (r)eload -nmap ,vr :so % - -" Type ,hl to toggle highlighting on/off, and show current value. -noremap ,hl :set hlsearch! hlsearch? - -" These are very similar keys. Typing 'a will jump to the line in the current -" file marked with ma. However, `a will jump to the line and column marked -" with ma. It’s more useful in any case I can imagine, but it’s located way -" off in the corner of the keyboard. The best way to handle this is just to -" swap them: http://items.sjbach.com/319/configuring-vim-right -nnoremap ' ` -nnoremap ` ' - -" ============================ -" SplitJoin plugin -" ============================ -nmap sj :SplitjoinSplit -nmap sk :SplitjoinJoin - -" Get the current highlight group. Useful for then remapping the color -map ,hi :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">" . " FG:" . synIDattr(synIDtrans(synID(line("."),col("."),1)),"fg#") - -" ,hp = html preview -map ,hp :!open -a Safari % - -" Map Ctrl-x and Ctrl-z to navigate the quickfix error list (normally :cn and -" :cp) -nnoremap :cn -nnoremap :cp diff --git a/vim/settings/yadr-sudo-write.vim b/vim/settings/yadr-sudo-write.vim deleted file mode 100644 index 7b9a67f..0000000 --- a/vim/settings/yadr-sudo-write.vim +++ /dev/null @@ -1,3 +0,0 @@ -" w!! to write a file as sudo -" stolen from Steve Losh -cmap w!! w !sudo tee % >/dev/null diff --git a/vim/settings/yadr-whitespace-killer.vim b/vim/settings/yadr-whitespace-killer.vim deleted file mode 100644 index b0c2703..0000000 --- a/vim/settings/yadr-whitespace-killer.vim +++ /dev/null @@ -1,15 +0,0 @@ -" via: http://rails-bestpractices.com/posts/60-remove-trailing-whitespace -" Strip trailing whitespace -function! StripTrailingWhitespaces() - " Preparation: save last search, and cursor position. - let _s=@/ - let l = line(".") - let c = col(".") - " Do the business: - %s/\s\+$//e - " Clean up: restore previous search history, and cursor position - let @/=_s - call cursor(l, c) -endfunction -command! StripTrailingWhitespaces call StripTrailingWhitespaces() -nmap ,w :StripTrailingWhitespaces diff --git a/vim/settings/yadr-window-killer.vim b/vim/settings/yadr-window-killer.vim deleted file mode 100644 index d177e90..0000000 --- a/vim/settings/yadr-window-killer.vim +++ /dev/null @@ -1,20 +0,0 @@ -" Use Q to intelligently close a window -" (if there are multiple windows into the same buffer) -" or kill the buffer entirely if it's the last window looking into that buffer -function! CloseWindowOrKillBuffer() - let number_of_windows_to_this_buffer = len(filter(range(1, winnr('$')), "winbufnr(v:val) == bufnr('%')")) - - " We should never bdelete a nerd tree - if matchstr(expand("%"), 'NERD') == 'NERD' - wincmd c - return - endif - - if number_of_windows_to_this_buffer > 1 - wincmd c - else - bdelete - endif -endfunction - -nnoremap Q :call CloseWindowOrKillBuffer() diff --git a/vim/settings/yadr-wrapping.vim b/vim/settings/yadr-wrapping.vim deleted file mode 100644 index 35d514c..0000000 --- a/vim/settings/yadr-wrapping.vim +++ /dev/null @@ -1,20 +0,0 @@ -" http://vimcasts.org/episodes/soft-wrapping-text/ -function! SetupWrapping() - set wrap linebreak nolist - set showbreak=… -endfunction - -" TODO: this should happen automatically for certain file types (e.g. markdown) -command! -nargs=* Wrap :call SetupWrapping() - -vmap gj -vmap gk -vmap g$ -vmap g^ -vmap g^ -nmap gj -nmap gk -nmap g$ -nmap g^ -nmap g^ - diff --git a/vim/settings/yankring.vim b/vim/settings/yankring.vim deleted file mode 100644 index 2f50a2d..0000000 --- a/vim/settings/yankring.vim +++ /dev/null @@ -1,3 +0,0 @@ -let g:yankring_history_file = '.yankring-history' -nnoremap ,yr :YRShow -nnoremap C-y :YRShow diff --git a/vim/vundles.vim b/vim/vundles.vim deleted file mode 100644 index c402973..0000000 --- a/vim/vundles.vim +++ /dev/null @@ -1,39 +0,0 @@ -" ======================================== -" Vim plugin configuration -" ======================================== -" -" This file contains the list of plugin installed using vundle plugin manager. -" Once you've updated the list of plugin, you can run vundle update by issuing -" the command :BundleInstall from within vim or directly invoking it from the -" command line with the following syntax: -" vim --noplugin -u vim/vundles.vim -N "+set hidden" "+syntax on" +BundleClean! +BundleInstall +qall -" Filetype off is required by vundle -filetype off - -set rtp+=~/.vim/bundle/vundle/ -set rtp+=~/.vim/vundles/ "Submodules -call vundle#rc() - -" let Vundle manage Vundle (required) -Bundle "gmarik/vundle" - -" YADR's vundles are split up by category into smaller files -" This reduces churn and makes it easier to fork. See -" ~/.vim/vundles/ to edit them: -runtime ruby.vundle -runtime languages.vundle -runtime git.vundle -runtime appearance.vundle -runtime textobjects.vundle -runtime search.vundle -runtime project.vundle -runtime vim-improvements.vundle - -" The plugins listed in ~/.vim/.vundles.local will be added here to -" allow the user to add vim plugins to yadr without the need for a fork. -if filereadable(expand("~/.yadr/vim/.vundles.local")) - source ~/.yadr/vim/.vundles.local -endif - -"Filetype plugin indent on is required by vundle -filetype plugin indent on diff --git a/vim/vundles/appearance.vundle b/vim/vundles/appearance.vundle deleted file mode 100644 index b18a59f..0000000 --- a/vim/vundles/appearance.vundle +++ /dev/null @@ -1,10 +0,0 @@ -Bundle "chrisbra/color_highlight.git" -Bundle "skwp/vim-colors-solarized" -Bundle "itchyny/lightline.vim" -Bundle "jby/tmux.vim.git" -Bundle "morhetz/gruvbox" -Bundle "xsunsmile/showmarks.git" -Bundle "chriskempson/base16-vim" - -" Required for Gblame in terminal vim -Bundle "godlygeek/csapprox.git" diff --git a/vim/vundles/git.vundle b/vim/vundles/git.vundle deleted file mode 100644 index 80b4422..0000000 --- a/vim/vundles/git.vundle +++ /dev/null @@ -1,4 +0,0 @@ -Bundle "gregsexton/gitv" -Bundle "mattn/gist-vim" -Bundle "tpope/vim-fugitive" -Bundle "tpope/vim-git" diff --git a/vim/vundles/languages.vundle b/vim/vundles/languages.vundle deleted file mode 100644 index 31a7e5d..0000000 --- a/vim/vundles/languages.vundle +++ /dev/null @@ -1,12 +0,0 @@ -Bundle 'sheerun/vim-polyglot' -Bundle 'pangloss/vim-javascript' -Bundle 'w0rp/ale' -Bundle 'garbas/vim-snipmate.git' -Bundle 'honza/vim-snippets' -Bundle 'jtratner/vim-flavored-markdown.git' -Bundle 'vim-syntastic/syntastic.git' -Bundle 'nelstrom/vim-markdown-preview' -Bundle 'skwp/vim-html-escape' -Bundle 'MaxMEllon/vim-jsx-pretty' -Bundle 'jparise/vim-graphql' -Bundle 'mogelbrod/vim-jsonpath' diff --git a/vim/vundles/project.vundle b/vim/vundles/project.vundle deleted file mode 100644 index 6e3c0d0..0000000 --- a/vim/vundles/project.vundle +++ /dev/null @@ -1,7 +0,0 @@ -Bundle "jistr/vim-nerdtree-tabs.git" -Bundle "preservim/nerdtree.git" -Bundle "ctrlpvim/ctrlp.vim" -Bundle 'JazzCore/ctrlp-cmatcher' -Bundle 'junegunn/fzf' -Bundle "xolox/vim-misc" -Bundle "xolox/vim-session" diff --git a/vim/vundles/ruby.vundle b/vim/vundles/ruby.vundle deleted file mode 100644 index f0c7bc8..0000000 --- a/vim/vundles/ruby.vundle +++ /dev/null @@ -1,10 +0,0 @@ -Bundle "ecomba/vim-ruby-refactoring" -Bundle "tpope/vim-rails.git" -Bundle "tpope/vim-rake.git" -Bundle "tpope/vim-rvm.git" -Bundle "vim-ruby/vim-ruby.git" -Bundle "keith/rspec.vim" -Bundle "skwp/vim-iterm-rspec" -Bundle "skwp/vim-spec-finder" -Bundle "ck3g/vim-change-hash-syntax" -Bundle "tpope/vim-bundler" diff --git a/vim/vundles/search.vundle b/vim/vundles/search.vundle deleted file mode 100644 index 2635f88..0000000 --- a/vim/vundles/search.vundle +++ /dev/null @@ -1,6 +0,0 @@ -Bundle "justinmk/vim-sneak" -Bundle "rking/ag.vim" -Bundle "henrik/vim-indexed-search" -Bundle "nelstrom/vim-visual-star-search" -Bundle "skwp/greplace.vim" -Bundle "Lokaltog/vim-easymotion" diff --git a/vim/vundles/textobjects.vundle b/vim/vundles/textobjects.vundle deleted file mode 100644 index 749bf1b..0000000 --- a/vim/vundles/textobjects.vundle +++ /dev/null @@ -1,15 +0,0 @@ -" These bundles introduce new textobjects into vim, -" For example the Ruby one introduces the 'r' text object -" such that 'var' gives you Visual Around Ruby -Bundle "austintaylor/vim-indentobject" -Bundle "bootleq/vim-textobj-rubysymbol" -Bundle "coderifous/textobj-word-column.vim" -Bundle "kana/vim-textobj-datetime" -Bundle "kana/vim-textobj-entire" -Bundle "kana/vim-textobj-function" -Bundle "kana/vim-textobj-user" -Bundle "lucapette/vim-textobj-underscore" -Bundle "nathanaelkane/vim-indent-guides" -Bundle "nelstrom/vim-textobj-rubyblock" -Bundle "thinca/vim-textobj-function-javascript" -Bundle "wellle/targets.vim" diff --git a/vim/vundles/vim-improvements.vundle b/vim/vundles/vim-improvements.vundle deleted file mode 100644 index 21fdd09..0000000 --- a/vim/vundles/vim-improvements.vundle +++ /dev/null @@ -1,31 +0,0 @@ -Bundle "AndrewRadev/splitjoin.vim" -Bundle "Raimondi/delimitMate" -Bundle "Shougo/neocomplete.git" -Bundle "briandoll/change-inside-surroundings.vim.git" -Bundle "godlygeek/tabular" -Bundle "tomtom/tcomment_vim.git" -Bundle "vim-scripts/camelcasemotion.git" -Bundle "vim-scripts/matchit.zip.git" -Bundle "kristijanhusak/vim-multiple-cursors" -Bundle "Keithbsmiley/investigate.vim" -Bundle "chrisbra/NrrwRgn" -Bundle "christoomey/vim-tmux-navigator" -Bundle "MarcWeber/vim-addon-mw-utils.git" -Bundle "bogado/file-line.git" -Bundle "mattn/webapi-vim.git" -Bundle "sjl/gundo.vim" -Bundle "skwp/YankRing.vim" -Bundle "tomtom/tlib_vim.git" -Bundle "tpope/vim-abolish" -Bundle "tpope/vim-endwise.git" -Bundle "tpope/vim-ragtag" -Bundle "tpope/vim-repeat.git" -Bundle "tpope/vim-surround.git" -Bundle "tpope/vim-unimpaired" -Bundle "vim-scripts/AnsiEsc.vim.git" -Bundle "vim-scripts/AutoTag.git" -Bundle "vim-scripts/lastpos.vim" -Bundle "vim-scripts/sudo.vim" -Bundle "goldfeld/ctrlr.vim" -Bundle "editorconfig/editorconfig-vim" - diff --git a/vimify/editrc b/vimify/editrc deleted file mode 100644 index 75f23e7..0000000 --- a/vimify/editrc +++ /dev/null @@ -1,3 +0,0 @@ -bind -v -bind "^R" em-inc-search-prev -bind \\t rl_complete diff --git a/vimify/inputrc b/vimify/inputrc deleted file mode 100644 index b2cc9d6..0000000 --- a/vimify/inputrc +++ /dev/null @@ -1 +0,0 @@ -set editing-mode vi diff --git a/vimrc b/vimrc deleted file mode 100644 index 9f3e37f..0000000 --- a/vimrc +++ /dev/null @@ -1,121 +0,0 @@ -" Use Vim settings, rather then Vi settings (much better!). -" This must be first, because it changes other options as a side effect. -set nocompatible - -" TODO: this may not be in the correct place. It is intended to allow overriding . -" source ~/.vimrc.before if it exists. -if filereadable(expand("~/.vimrc.before")) - source ~/.vimrc.before -endif - -" ================ General Config ==================== - -set number "Line numbers are good -set backspace=indent,eol,start "Allow backspace in insert mode -set history=1000 "Store lots of :cmdline history -set showcmd "Show incomplete cmds down the bottom -set showmode "Show current mode down the bottom -set gcr=a:blinkon0 "Disable cursor blink -set visualbell "No sounds -set autoread "Reload files changed outside vim - -" This makes vim act like all other editors, buffers can -" exist in the background without being in a window. -" http://items.sjbach.com/319/configuring-vim-right -set hidden - -"turn on syntax highlighting -syntax on - -" Change leader to a comma because the backslash is too far away -" That means all \x commands turn into ,x -" The mapleader has to be set before vundle starts loading all -" the plugins. -let mapleader="," - -" =============== Vundle Initialization =============== -" This loads all the plugins specified in ~/.vim/vundles.vim -" Use Vundle plugin to manage all other plugins -if filereadable(expand("~/.vim/vundles.vim")) - source ~/.vim/vundles.vim -endif -au BufNewFile,BufRead *.vundle set filetype=vim - -" ================ Turn Off Swap Files ============== - -set noswapfile -set nobackup -set nowb - -" ================ Persistent Undo ================== -" Keep undo history across sessions, by storing in file. -" Only works all the time. -if has('persistent_undo') && isdirectory(expand('~').'/.vim/backups') - silent !mkdir ~/.vim/backups > /dev/null 2>&1 - set undodir=~/.vim/backups - set undofile -endif - -" ================ Indentation ====================== - -set autoindent -set smartindent -set smarttab -set shiftwidth=2 -set softtabstop=2 -set tabstop=2 -set expandtab - -" Auto indent pasted text -nnoremap p p=`] -nnoremap P P=`] - -filetype plugin on -filetype indent on - -" Display tabs and trailing spaces visually -set list listchars=tab:\ \ ,trail:· - -set nowrap "Don't wrap lines -set linebreak "Wrap lines at convenient points - -" ================ Folds ============================ - -set foldmethod=indent "fold based on indent -set foldnestmax=3 "deepest fold is 3 levels -set nofoldenable "dont fold by default - -" ================ Completion ======================= - -set wildmode=list:longest -set wildmenu "enable ctrl-n and ctrl-p to scroll thru matches -set wildignore=*.o,*.obj,*~ "stuff to ignore when tab completing -set wildignore+=*vim/backups* -set wildignore+=*sass-cache* -set wildignore+=*DS_Store* -set wildignore+=vendor/rails/** -set wildignore+=vendor/cache/** -set wildignore+=*.gem -set wildignore+=log/** -set wildignore+=tmp/** -set wildignore+=*.png,*.jpg,*.gif - -" ================ Scrolling ======================== - -set scrolloff=8 "Start scrolling when we're 8 lines away from margins -set sidescrolloff=15 -set sidescroll=1 - -" ================ Search =========================== - -set incsearch " Find the next match as we type the search -set hlsearch " Highlight searches by default -set ignorecase " Ignore case when searching... -set smartcase " ...unless we type a capital - -" ================ Security ========================== -set modelines=0 -set nomodeline - -" ================ Custom Settings ======================== -so ~/.yadr/vim/settings.vim diff --git a/zsh/aliases.zsh b/zsh/aliases.zsh index 7f4d754..2547c6a 100644 --- a/zsh/aliases.zsh +++ b/zsh/aliases.zsh @@ -13,9 +13,6 @@ elif [[ $unamestr == 'Darwin' ]]; then fi # YADR support -alias yav='yadr vim-add-plugin' -alias ydv='yadr vim-delete-plugin' -alias ylv='yadr vim-list-plugin' alias yup='yadr update-plugins' alias yip='yadr init-plugins' @@ -48,25 +45,16 @@ TRAPHUP() { source $yadr/zsh/aliases.zsh } -alias ae='vim $yadr/zsh/aliases.zsh' #alias edit +alias ae='nano $yadr/zsh/aliases.zsh' #alias edit alias ar='source $yadr/zsh/aliases.zsh' #alias reload alias gar="killall -HUP -u \"$USER\" zsh" #global alias reload -# vim using -mvim --version > /dev/null 2>&1 -MACVIM_INSTALLED=$? -if [ $MACVIM_INSTALLED -eq 0 ]; then - alias vim="mvim -v" -fi -# mimic vim functions alias :q='exit' -# vimrc editing -alias ve='vim ~/.vimrc' # zsh profile editing -alias ze='vim ~/.zshrc' +alias ze='nano ~/.zshrc' # Git Aliases alias gs='git status' @@ -77,7 +65,7 @@ alias gsa='git stash apply' alias gsh='git show' alias gshw='git show' alias gshow='git show' -alias gi='vim .gitignore' +alias gi='nano .gitignore' alias gcm='git ci -m' alias gcim='git ci -m' alias gci='git ci' diff --git a/zsh/vi-mode.zsh b/zsh/vi-mode.zsh index 4ac7453..8fb042d 100644 --- a/zsh/vi-mode.zsh +++ b/zsh/vi-mode.zsh @@ -1,3 +1,3 @@ set -o vi -export EDITOR=vim -export VISUAL=vim +export EDITOR=nano +export VISUAL=nano