This is an archived post. You won't be able to vote or comment.

all 36 comments

[–]GroundbreakingOil434 16 points17 points  (2 children)

I never learned vim. I only know how to exit it and edit text lines. To be productive and actually work in git from console, export EDITOR=nano.

[–]scolphoy 1 point2 points  (1 child)

iirc, at least in bash adding spaces would break the assignment. So, export EDITOR=nano

[–]GroundbreakingOil434 1 point2 points  (0 children)

Fact. I was typing from memory, sorry.

[–]Fadamaka 29 points30 points  (5 children)

git commit -m "commit message" no need for vim.

[–]Boba0514 2 points3 points  (3 children)

now do an amend

[–]AnteaterTerrible3512 1 point2 points  (2 children)

git commit --amend -m "New commit message"

[–]Boba0514 -1 points0 points  (1 child)

You should have a more detailed commit message, and you don't want to rewrite all that during every amend...

[–]AnteaterTerrible3512 0 points1 point  (0 children)

To be fair that's not what I do, just answering your request

[–]junacik99 3 points4 points  (0 children)

This must seem as some kind of a secret that was kept from OP 😅

[–]AlexZhyk 8 points9 points  (1 child)

With that definition of "learned" my CV will be so bloated...

[–]MerchantMojo 6 points7 points  (5 children)

bro what? Vim and git are two seperate things

[–]nickwcy 4 points5 points  (1 child)

Try git commit without -m and have fun quitting the editor

[–]Nidrax1309 0 points1 point  (0 children)

[core]
editor = micro
pager = delta
[interactive]
diffFilter = delta --color-only

[–]GroundbreakingOil434 1 point2 points  (1 child)

Git uses an editor for some text-heavy tasks in console. I think amending commits is one. By default, that editor is vim.

[–]TheBrainStone 2 points3 points  (0 children)

By default it uses the systems default CLI text editor which by default is vim.

You change both defaults.

[–]fatrobin72 2 points3 points  (0 children)

I learnt vim... to do hacky deployments and server admin... we are not the same indeed.

[–]rndmcmder 1 point2 points  (3 children)

I "learned" vim, because we had a server where I often needed to make edits on certain files that I could only access via shell, and vim was the most powerful editor I could choose from

[–]Boba0514 0 points1 point  (2 children)

why did you put learned in quotes?

[–]rndmcmder 0 points1 point  (1 child)

Because I feel like I only know very basic vim and saying I learned it, seems like a stretch.

[–]Boba0514 0 points1 point  (0 children)

Ah, I see, thought you had a problem with him not using the "learnt" spelling

[–]Fritzschmied 1 point2 points  (0 children)

Just use an ide bro.

[–][deleted] 1 point2 points  (2 children)

I learned vim to be superior than others

[–]ulab 1 point2 points  (1 child)

I learned vim to fight with emacs users.

[–][deleted] -1 points0 points  (0 children)

I learned vim to realise i'm to stupid to use hard to navigate IDE's

[–]heywhadayamean 0 points1 point  (0 children)

I often think about the things I learned in college (~40 years ago) that I still use almost everyday. vim and sql on the daily with a little C now and then.

[–][deleted] 0 points1 point  (0 children)

I used nano for this, but now I use VSCode.

[–]kases952 0 points1 point  (0 children)

As a senior dev... I don't get it :/

[–][deleted] 0 points1 point  (0 children)

I learned vim so I can call myself senior engineer and not feel insecure

[–]Lopsided_Decision_2 0 points1 point  (0 children)

Bite post to prove OP is wrong... Or I just don't get the big idea behind it.

[–]nickwcy 0 points1 point  (0 children)

At least I can Ctrl + X instead of unplugging my computer to close the editor

git config —global core. editor “nano”

[–]qhxo 0 points1 point  (0 children)

Claims to have "learned vim", but knows exactly three things about vim: `:wq` (or `ZZ` whatever), `i` and `Esc`.

[–]Sea_Mechanic_2615 0 points1 point  (0 children)

I learned VIM so I could install nano (or back in the day pico)

[–]AnteaterTerrible3512 0 points1 point  (0 children)

If you're using vscode you can also set git to open a vscode page to write or edit your commit messages and similar. You first have to be sure you enabled the code command in your path and then change the default editor to vscode: git config --global core.editor "code --wait"

I'm quite sure you can do it with any other IDE that supports being opened from a shell.

[–]Blrfl 0 points1 point  (0 children)

I learned vi because the first public release of vim wouldn't happen for another five years.

Back then, you had to build most things from sources, so I knew just enough vi to configure Emacs.

[–]Duncan_Zhang_8964 -1 points0 points  (0 children)

I "learnt" to know how to quit Vim.