Skip to content

Latest commit

 

History

History
121 lines (86 loc) · 4.31 KB

README.md

File metadata and controls

121 lines (86 loc) · 4.31 KB

image

These are my dotfiles, my configurations, my shell home I'd like to share.


Quick Start

To get it up and running, first pull it down into your $HOME:

$ git clone git@github.com:achiu/dotfiles.git .dotfiles

then you can simply:

$ script/setup

Configurations

  • Fish shell
  • Tmux
  • Neovim
  • asdf

Tmux

  • Sets leader key to ctrl + a
  • Sets default shell to fish
  • configured reattach-to-user-namespace for copy-pasta in fish
Command Description
ctrl + ac Open a new tmux 'window'
ctrl + a" Open a new horizontal split pane
ctrl + a% Open a new vertical split pane
ctrl + aq + <num> Switch to a number pane.
ctrl + az Fullscreen a current split/pane

Neovim

This setups vim to use vim-sensible as a base with a few exceptions:

  • sets leader key to ,
  • sets to nocompatible
  • shows line numbers
  • syntax is enabled
  • encoding defaults to utf-8
  • don't wrap lines
  • expands tabs and sets them to two spaces
  • show 'invisible' characters
  • no swap, no backup, no undofile
  • ignores output files like swp, .class, .rbc and much more
Command Plugin Description
ctrl + p Denite Shows all the files in the current directory
ctrl + b Denite Shows all the currently existing buffers
ctrl + / Denite grep over the current director
, + n NERDTree Opens the file browser
, + rt TagBar Opens the ctags browser
, + / NERDCommenter Comment out the current or visually slected lines
, + gb Fugitive.vim Show the gitblame for the current buffer
, + al Tabularize Align certain characters e.g => =
, + di Dispatch Run specific command for the given project and file type
, + ig Indent Guides Shows the indentation for the current buffer
ctrl + y + , Emmet Generate the html tag for the given HTML shorthand

Denite

ctrl + o

This switches you into normal mode in the panes. This allows you to move around the denite panes using vim motions and action on your selection.

Dispatch

, + d + i

This runs a default set of commands on a certain file type like:

  • ruby - bundle exec ruby -I test <path>
  • rust - cargo test

Project Diretory Specific commands

Add a .vimrc.local to your project specific directory and execute , + d + i:

" set a global dispatch
let b:dispatch = 'make'
" for ruby specific projects files in this directory
autocmd FileType ruby let b:dispatch = 'bundle exec rspec %'

Instance specific dispatch commands

Use FocusDispatch:

:FocusDispatch my/shell/command

vim-plug

Plugins all sit in nvimrc. Once you've updated the list you can install it with:

:PlugInstall

Some plugins requires an additional step to leverage neovim:

:UpdateRemotePlugins