/dotfiles

Primary LanguageVim Script

dotfiles

To Install

  1. Hombrew
    • Restore everything that was installed by restoring my Brewfile
  2. Tmux (should be installed through brew's backup)
  3. Zsh (should be installed through brew's backup)
  4. Oh My Zsh
  5. asdf (should be installed through brew's backup)
  6. Vim (should be installed through brew's backup)

Oh My Zsh

iTerm key mappings

Go to iTerm2 > Preferences > Profiles > Keys

Shortcut Action Code
⌥+←Delete Send Hex Code 0x17
⌘+←Delete Send Hex Code 0x15
⌥+← Send Escape sequence b
⌥+→ Send Escape sequence f

Also, ITerm2 -> Preferences -> Profiles -> keys -> General -> Choose "left Option key " as "Esc+"

Git

Create a global .gitignore.

  • git config --global core.excludesfile ~/.gitignore_global

Use a template commit message.

  • git config --global commit.template ~/.gitmessage

Use verbose mode in commit messages.

  • git config --global commit.verbose true

Use zdiff3 as merge conflict style.

  • git config --global merge.conflictstyle zdiff3

Always sign the commits with the GPG keys.

  • git config --global commit.gpgsign true

Automatically create remote branch on push.

  • git config --global push.autoSetupRemote true

ASDF

Install plugins that are in .tool-versions.

FZF - A command-line fuzzy finder

Install should no longer be needed. Will be installed when installing everything with brew's backup. Step 2 still needs to be followed

Follow instructions in https://github.com/junegunn/fzf#installation

Setup Vim

Install vim-plug

curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

Solarized Theme

I'm using the Solarized Dark theme developed by Ethan Schoonover

iTerm

Install and enable Solarized Dark theme from Official repo.

Install and enable Solarized Dark - Patched theme from this here

Useful links:

Vim

Already installed. No need to do anything. Instruction here if needed: https://github.com/maxmx03/solarized.nvim

Tmux

Instruction here if needed: https://github.com/seebi/tmux-colors-solarized

Enable italics

https://apple.stackexchange.com/questions/249307/tic-doesnt-read-from-stdin-and-segfaults-when-adding-terminfo-to-support-italic/249385. No longer using because it broke in a recent tmux update.

Currently using xterm-256colors to enable italics and have the colors correctly: gpakosz/.tmux#382 (comment) This is a bit unorthodox since only screen-256color or tmux-256color should be used inside tmux and this might lead to incorrect colors in some cases, but it's the best solution I found so far. This happened mostly in the nvim-telescope picker, where the hovered item wasn't highlighted correctly, but instead was being italicized. It also happened in the other places, likes visual mode in vim, where the selected had a low contrast collor.

Old

YouCompleteMe (Plug should handle installation)

  • brew install cmake

xclip (Will be installed through brew's backup)

In order to copy the whole tmux buffer into the normal buffer

  • brew install xclip

Common errors

YCM with Javascript files

(Should not happen anymore has I have disabled YCM for every filetype except .tex)

When opening a .js or .jsx the following error might occur

RuntimeError: Warning: Unable to detect a .tern-project file in the hierarchy before /Users/ain/projects/iptools-jquery-modal and no global .tern-config file was found. This is required for accurate JavaScript completion.

To solve follow: ain/.vim#46 (comment)

oh-my-zsh when being loaded by Tmux

This might cause oh-my-zsh to not be properly loaded when zsh is loaded by tmux. Reloading zsh or source ~/.zshrc seems to fixed this.

Since I'm relying on brew to install zsh, this might be fixed by following this: https://stackoverflow.com/a/35762726

:MetalsInstall throws an error when using an Apple M1/M2 chip

This might be because of Coursier on M1/M2 chips. There is an issue in nvim-metals repository regarding that.

Should be fixed by running:

softwareupdate --install-rosetta