Skip to content

qarni/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

Hi! So, this is my set of config files (for Vim, Tmux, Bash, and Git) for when I need to be using a new computer or when I want people to try vim because I love vim (wow, did you know?).

Feel free to use any/all of these, or parts of them as needed. It might be useful to just take the parts you need, and add whatever I'm missing. I got a handful of stuff for vim/tmux from when I worked at Braintree here (thanks Braintree).

On that note, you can find more useful plugins here: Vim Awesome.

This is what my vim/tmux/bash looks like:

image

Features:

Vim:

Honestly, I've changed this so much over the years that I can't really remember what it is that I added anymore... but here's a list of the stuff I do remember:

  • Allows wrapping around to next line
  • Mouse mode (scrolling, clicking)
  • Line numbers
  • Language specific tabs/spaces
  • Color scheme: Monokai. You can change this line in the .vimrc :colorscheme [color scheme name] to update it.
  • F7 for autoformat C/C++ code

Plugins:

  • I used the Vundle plugin manager, just because it was easy to use... there's a few different ones you can use instead if you want.
  • This lets you include new plugins by just writing Plugin [github username/repo name] in your vimrc.
  • install with :PluginInstall.
  • uninstall by deleting and running :PluginClean.
NERD Tree - the file explorer:
\nt - open/close NERD Tree
\nf - reveal current file in NERD Tree
\nr - refresh contents of NERD Tree (can also use r or R to refresh a folder)
? - in NERD Tree to see all shortcuts
CtrlP - Fuzzy finder:

This is so much better than using the file explorer when you need to search through a ton of files.

\ff - find a file
TComment - Commenting:
gcc - toggle comments on the current line
\cc - toggle comments
Fugitive - Git wrapper
:Gstatus - git status
:Gblame - git blame

...amongst a bunch of other things
VimAutoclose/Surround
  • Auto closes parens, quotes etc
  • Customizable tab bar thingy
Devicons - icons
  • You can comment out line 40 Plugin ryanoasis/vim-devicons if you don't want to deal with installing the font for the icons. They're cute though. But unnecessary.

Tmux:

  • Here's a handy tmux cheatsheet. I'm just listing the things I changed:

  • I changed the prefix to Ctrl + a instead of the default Ctrl + b because... a is closer than b. prefix will stand for Ctrl + a

  • Mouse mode is on, so you can drag panes with mouse, or click to a different window

prefix + | - split pane vertically

prefix + v - split pane vertically

prefix + - - split pane horizontally

prefix + s - split pane horizontally

Alt/Option + [arrow key] - switch panes without needing prefix

prefix + r - reload tmux config file

Plugins:

  • I used TPM: as the plugin manager:
  • Add new plugin to ~/.tmux.conf with set -g @plugin [pluginname]
  • Install plugins with prefix + I (capital i).
  • Uninstall by removing plugin from ~/.tmux.conf and pressing prefix + alt/option + u
  • The theme I use works well with a dark background, you should probably change it/uninstall this plugin if you have a light background.

Bash:

  • Includes what git branch you are in if you're in a git repo

Git:

  • Includes some git aliases

Installation/Setup:

If you decide to use this :')

Clone repo!

git clone https://github.com/qarni/dotfiles.git [destination]

And copy over whichever of these files you want to your root directory.

Vim:

  1. Install Vundle by running:
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
  1. Install Monokai color scheme:
# create directory for vim colors if it does not already exist
mkdir -p ~/.vim/colors

And then download the colors/monokai.vim file from the repo to ~/.vim/colors.

  1. Follow directions here to install Nerd font. You might need to change things depending on what terminal you use? I use iterm2.
  2. Follow directions here to install YouCompleteMe at your own risk, or just leave it commented out.
  3. Open your vimrc file in vim: vim ~/.vimrc.
  4. Run the command: :PluginInstall.
  5. Yay everything should be good to go for vim!

Tmux:

  1. Make sure you have tmux installed. You can run the command tmux to check. If it's not installed... install it. :)
  2. Clone Tmux Plugin Manager: git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
  3. Open a tmux session: tmux
  4. Run this command to load your tmux config file: tmux source-file ~/.tmux.conf.
  5. Press prefix + I (capital i) to fetch the plugin.
  6. Yay tmux works too!

About

Config files to make life easier

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published