Skip to content

Instantly share code, notes, and snippets.

View ThuanNP's full-sized avatar
🎯
Focusing

Thuận Nguyễn Phước ThuanNP

🎯
Focusing
  • Công Ty Công Nghệ Thông Tin Điện Lực Thành Phố Hồ Chí Minh
  • 114a Hồng Hà Ward 2, Tân Bình district, Hồ Chí Minh City, Việt Nam
  • 05:35 (UTC +07:00)
  • X @Thuan_NgPh
View GitHub Profile
@ThuanNP
ThuanNP / vim_crash_course.md
Created August 9, 2024 02:35 — forked from dmsul/vim_crash_course.md
Vim Crash Course

NOTE: Specific examples given for options, flags, commands variations, etc., are not comprehensive.

NORMAL MODE

Vim has 2 main "modes", that chance the behavior of all your keys. The default mode of Vim is Normal Mode and is mostly used for moving the cursor and navigating the current file.

Some important (or longer) commands begin with ":" and you will see the text you enter next at the bottom left of the screen.

:q[uit] - quit (the current window of) Vim. ("Window" here is internal to Vim, not if you have multiple OS-level windows of Vim open at once.)
:q! - force quit (if the current buffer has been changed since the last save)
:e[dit] {filename} - read file {filename} into a new buffer.

Go to onedrive folder in your pc and create a folder for git repository.
Usually onedrive resides in `C:\Users\%username%\OneDrive`
Open GitBash
cd ~/OneDrive
mkdir git
cd git
mkdir myproject
cd myproject
@ThuanNP
ThuanNP / use-bbdiff
Created February 26, 2024 02:02 — forked from wholmgren/use-bbdiff
set git difftool to bbdiff
git config --global diff.tool bbdiff
git config --global difftool.bbdiff.cmd 'bbdiff --wait --resume "$LOCAL" "$REMOTE"'
git config --global difftool.prompt false
git config --global merge.tool bbdiff
git config --global mergetool.bbdiff.cmd 'bbdiff --wait --resume "$LOCAL" "$REMOTE"'
Double check ~/.gitconfig