General > General Technical Chat
Religious technical opinions
Someone:
--- Quote from: alexanderbrevig on February 24, 2022, 11:31:06 pm ---vim is the only editor, vim is the best editor, if you disagree you've not really tried it (or using emacs which is fine) <vim makes me forget tabs vs spaces is a thing>
--- End quote ---
Citation needed ;) (consider the title/OP of the thread)
https://vim.fandom.com/wiki/Indent_with_tabs,_align_with_spaces
Promoting never mixing tabs and spaces, like the repeated suggestions in this thread:
--- Quote from: Someone on February 20, 2022, 01:12:04 am ---then you cannot use tabs to bring anything after some ragged text into alignment, only for the start of line before other characters.
--- End quote ---
--- Quote from: T3sl4co1l on February 24, 2022, 01:17:48 am ---BTW, an actually useful argument in favor of tabs:
https://www.reddit.com/r/javascript/comments/c8drjo/nobody_talks_about_the_real_reason_to_use_tabs/
It seems the most effective use is to combine both, tabbing only to set indentation, then only spaces to align text
--- End quote ---
--- Quote from: Siwastaja on February 24, 2022, 06:12:59 pm ---
--- Quote from: T3sl4co1l on February 24, 2022, 01:17:48 am ---It seems the most effective use is to combine both, tabbing only to set indentation, then only spaces to align text e.g. when you have to lay out a table or something in the comments,
--- End quote ---
Exactly this. Tabs are the right way because then everyone can choose their exact own preference, and code base written with tab indentation on the left will automagically just work for any setting. There is then no need to fight over the "right" amount of indentation.
--- End quote ---
alexanderbrevig:
--- Quote from: Someone on February 25, 2022, 12:33:31 am ---
--- Quote from: alexanderbrevig on February 24, 2022, 11:31:06 pm ---vim is the only editor, vim is the best editor, if you disagree you've not really tried it (or using emacs which is fine) <vim makes me forget tabs vs spaces is a thing>
--- End quote ---
Citation needed ;) [...]
--- End quote ---
I've had a hard time finding research on the subject, but every poll I looked at, vim is on top :)
https://slashdot.org/poll/1717/favorite-text-editor
https://opensource.com/life/15/7/your-preferred-text-editor
https://www.linux.org/threads/poll-favorite-text-editor.6
I know these only mean that the users of say slashdot, that are willing to cast a vote, prefer vim.
Tabs vs spaces should not be a religious opinion as some file formats will dictate one or the other.
* YAML = spaces
* Makefile recipes = tabsThere's no way around it.
If your editor can't help you with it, shame on it. If you don't change from archaic tools, shame on you ;)
Notepad++ et.al is like a crusty old soldering pen, where vim and emacs are the JBC and Metcal. Tools you can trust, and that grow with you. :-+
Siwastaja:
--- Quote from: alexanderbrevig on February 24, 2022, 11:31:06 pm ---I don't get why people still argue about tabs vs spaces!?
--- End quote ---
Because many people enjoy arguing, or even if they don't enjoy it, they are addicted to it.
Using spaces to indent code is an excellent argument generator, because you can argue about the number of spaces and spaces vs. tabs until cows come home.
Just using tabs, with the designated key on the keyboard, designed for exactly this purpose, would be too obvious, trivial, and Just Work. Therefore, it's not acceptable.
Siwastaja:
... practically you need to remember though that starting an edit war is the worst thing you can do. Even if you prefer the other way, when working in team projects, you have to cope with the choices made by others. The silver lining is, a file with either spaces or tabs is always somehow manageable.
alexanderbrevig:
--- Quote from: Siwastaja on February 25, 2022, 07:28:14 am ---... practically you need to remember though that starting an edit war is the worst thing you can do. Even if you prefer the other way, when working in team projects, you have to cope with the choices made by others. The silver lining is, a file with either spaces or tabs is always somehow manageable.
--- End quote ---
I agree, though choices should be explicit in an https://editorconfig.org/ file (or something similar).
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version