Vi is not vim
hugodaniel.pt
hugodaniel.pt
>Your focus will be in semantics and it is easier to get into it without the syntax aggressively jumping at your face.
I'm not sure I agree with this. As a programmer, your tool for expressing semantics is through syntax. While the author argues that disabling syntax highlighting makes the syntax less important, I feel that removing syntax highlighting places undue stress on the author by removing the first level of immediate validation that the syntax is correct.
I find myself jumping between languages far too often to trust myself to use the correct syntax on the first try, so much so that I consider in-editor linting to be an indispensable tool.
Perhaps if someone only ever wrote one or a few very different languages, they wouldn't have to worry about if their language indexes by range with [a:b], [a..b], or .slice(a,b).
Syntax highlighting is most useful to me to make things like unclosed quotes stand out. I don't find the highlighted reserved words and other highlights to be all that beneficial.
I've been sorely tempted several times to:
1. pick one syntax for things like array initialization, ranges, for loops, string quoting, and various other things that are all reasonably similar from a functionality point of view in Perl, PHP, Python, and JavaScript but use different enough syntax that I sometimes forget which one is right,
2. start writing my Perl, PHP, Python, and JavaScript using that syntax, and
3. write some sort of preprocessor that takes in files that are Perl, PHP, Python, and JavaScript but that use my syntax instead of the native syntax, and replaces my syntax with native syntax.
I usually didn't go ahead with it because I just figured I was being silly and everyone would make fun of me. :-)
But now it seems quite common for people to define new languages that are just existing languages with some better syntax or other features and that are translated back to the original language.
So now I don't do it because I assume someone else will do it soon, and I'll be happy to just grab theirs and use it.
>If you still struggle with syntax then please use syntax highlighting, it will help those special words stand out.
I find syntax-highlighted code far easier to read, in part because it becomes less just a blob of amorphous text. Our eyes are better at noticing blobs of text that are green than blobs of text which happen to be preceded by a "//" or some such.
I remember the pain of using vi on old terminals, but despite its shortcomings, it was better than coding on printer-based terminal, editing on ex.
I really cannot use vi (nvi, elvis, etc) instead of Vim, because I need visual mode. I need unicode. The op mentioned lacking unicode as a feature, but I disagree. It's not that I use Unicode in source code, but I work in international open-source projects, where codes might contain anything, including emojis and foreign characters in the comment.
Also I really would miss CtrlP (fuzzy file finder), vim-surround, etc. Pressing ctrl-p is ingrained in my fingertips, and it feels awkward when an editor doesn't respond to ctrl-p.
Also stock Vim feels just like vi especially with 'compatible' mode enabled. With Vim, you don't have to install plugins or features you don't need, and it runs fairly fast. Also I can recommend neovim, if performance becomes an issue.
Seriously. How many of us are actually at the point where our limiting factor is how fast we can edit instead of how fast we think about the code we want to get on the screen?
My friend used to type at 70 wpm in a regular editor. After failing some interviews because he couldn't work fast enough, he started doing http://keyhero.com and practicing vim keybindings half an hour a day. Now he types at 130 wpm, more than doubled the amount of code he writes a day, and won't shut up about it.
There's certainly nothing to lose by getting faster at typing/editing code.
set tabstop=2
set ts=2
I could be wrong, but as I recall, "ts" is shorthand for "tabstop", so I think this is redundant and the file could be made shorter by deleting the first one.I've come to think that insisting on minimalist tooling is misguided once you have fast computers.
Still worth knowing the basics of vi, but Tramp has made it vanishingly rare at this point that I ever have to edit anything outside my main local Emacs session, which is nice.
Stayed for:
* Integrated terminal that also supports ligatures
* Pluggable debugger: one interface across gdb, delve, node, Chrome and other browsers, etc...
* Built in git support that's nicer in my opinion than any of the plugins for Sublime
* Markdown previews
* Seriously good Intellisense, it even tells me the schema of nested objects returned from another function in JavaScript.
* Probably some more that I forgot...
I don't regret buying Sublime, but VS Code targets the same platforms, has way more features and a faster release cycle, and did I mention it's free and open source?
For what it's worth, I always use Sublime for really large files.
An there lies the problem, what other editor is he going to use? Vim? ;)
I loath the manipulation of the back button.
But alas there is none. :(
My inner Asian is screaming.
:q!
One of the most important UX advances of recent years, IMO. Introduced in Vim 6.3, released in June 2004.
>2004
:)
VIM is hard for first time users.