BAR
Configuration files for various tools:
ghostty: terminal emulatornvim: text editorhyprland: linux window manager (runs on Wayland)hyprlock: lock screen for hyprlandhypridle: sleep / shutdown logic for hyprlandhyprpaper: themes for hyprlandhyprmocha: colors for hyprlandwaybar: status bar on top of screenwofi: search menu (think: spotlight search on OSX)
Clone this repository. Then install GNU stow which can be installed as follows:
Macos:
brew install stow
Archlinux:
sudo pacman -S stow
yay -S stow
Run the following command to create symlinks of the dotfiles for each tool:
stow -t "$HOME" [package]
Here are notes to myself of things to work on in order to use my neovim config more efficiently.
- Base vim, normal mode
- Registers
- Yank to register with
"ay - Paste from register with
"ap - Yank register,
"0, saves last yank (but not deletes!) - Numbered registers,
"1-9, saves recently deleted (but not yanked!)
- Yank to register with
- Macros
q[register]-> record macro to given register@[register]-> apply macro from given register
- Case changing
- gu[OBJECT] gU[OBJECT] -> change to uppercase / lowercase
- Base vim, edit mode
Ctrl+t/Ctrl+d-> add / remove indentCtrl+w-> delete wordCtrl+R [register]-> paste from register
- Mini.ai
vabandvib-> select around / in bracketsvaqandviq-> select around / in quotationsvaeandvie-> select around / in expression (loop, conditional, function)- Note: repeating
aeoriewill select the next level up
- Note: repeating
canaandcina-> edit around / in next argument
- Mini.surround
sai[TEXTOBJECT][CHARACTER]-> surround textobject with character- E.g.
saiw]-> surround word with] - E.g.
saib}-> surround brackets with} - Note: Open
(,[, and{includes a space. Closed),], and}does not.
- E.g.
sd[CHARACTER]-> remove characters surrounding cursorsr[CHARACTER]-> remove characters surrounding cursorsdf-> remove function declaration
- Mini.comment
gcc-> comment linegc[OBJECT]-> comment text objectgcgc-> uncomment comment blockdgc-> delete comment block
Here are notes to myself for how to use git more effectively. ADDING MERGE CONFLICT HERE
- Info from "main" branch.
- Plumbing
- Three types of objects -> commits, trees, and blobs.
- Commits -> points to the project root tree and adds metadata ( parent commit, author, committer, timestamp, message ). This is a pointer to a snapshot of the project.
- Tree -> way that git stores a directory. Contains blobs and other trees.
- Blob -> way that git stores a file. Contains the contents of the file.
- NOTE: Git reuses tree/blob hashes between commits if the contents of the tree/blob does not change!
git cat-file -p [hash]-> cat out contents of git object
- The git log
git log --graph --oneline --all-> cat out commit history
- The HEAD
- Git's pointer to the snapshot of the repo that is currently checked out
- Typically points to a branch, (e.g. HEAD -> main -> fa56def), but can also point directly to a commit. This is called a "detached HEAD".
- Git branches
- A branch is a named pointer to a commit
git branch-> lists local branches. Branch I am on is marked with a *.git switch [branch]-> move HEAD to [branch].-ccreates a new branch. Uses current commit as branch base.- `git switch [branch] [hash]
git branch -m oldname newname-> rename branchgit branch -d [branch]delete the branch pointer (not necessarily the commits!)git reset [hash]-> moves branch pointer to commit.--harddiscards uncommitted changes.--softkeeps changes staged
- Git merges
git merge [target_branch]-> If onsource_branch, mergestarget_branchintosource_branch. The following occurs:- Find the "best common ancestor" commit of the two branches.
- Replay the changes from
source_branch, starting from the best common ancestor, into a new commit. - Replay the changes from
target_branchontosource_branch, starting from the best common ancestor. - Record the result as a new commit with two parents.
- Fast-forward merge -> If
target_branchhas all the commits thatsource_branchhas, then git just moves the pointer ofsource_branchto the tip oftarget_branch.
- Git rebases
git rebase [target_branch]-> If onsource_branch, rebasessource_branchontotarget_branch. The following occurs:- Find the "best common ancestor" commit of the two branches.
- Replay the commits of
source_branchonto the tip of thetarget_branch. NOTE: Creates new commit hashes. - NOTE: Should never rebase public branches (like
main). This is because a rebase rewrites commits, and if other devs have those commits, could create problems.
- Now, can switch to
target_branchand mergesource_branchintotarget_branch. This will create a fast-forward merge, which preserves history.
- Remotes
- A
remoteis just a named reference to another repository that is treated as the ultimate source of truth. It is in contrast tolocal, which is a copy of the repository. - The default name for the
remoteassociated with alocalrepository isorigin git remote add [name] [uri]-> add [name] (which is located at [uri]) as the remote for a local repositorygit fetch-> copies contents of.git/objectsfromremoteintolocal. NOTE: does not update local branches or change treegit merge [remote]/[branch]-> merge remote branch into local branch. NOTE: updates local branchesgit pull [remote] [branch]-> Just combinesgit fetchandgit merge [remote]/[branch]git push [remote] [branch]-> send local commits on [branch] to remote [branch]
- Merge conflicts