7 ms·
Line numbers are great, until you try to cut and paste. But then again, VI/M wasn't designed for GUIs.
by SoSoRoCoCo 6y ago
Line numbers are great, until you try to cut and paste. But then again, VI/M wasn't designed for GUIs.
- strogonoff 6y agoI don’t copy and paste, I just don’t see the need for line numbers. But then I also code with syntax highlighting off about half of the time.
- mjochim 6y agoVery interesting, I don't think I've ever talked to someone who would choose to disable syntax highlighting. Do the colors actively annoy you or is it just that you don't care?
- strogonoff 6y agoI find that not having highlighting to rely on forces me to write more readable code. I might turn it on if I happen to work on a hairy codebase under time constraints. Sometimes also colors in general can get distracting and I just turn on grayscale system-wide, which also doesn’t play with syntax highlighting as text ends up being varying shades of gray with not enough contrast against the background.
- raarts 6y agoI grew up without it and I think my brain is wired to recognize visual structure instead of colors. Switching it off is the first I do.
- lloeki 6y agoI tried both ends of the spectrum. There’s definitely something real about too much colours; the archetypal example of colouring our human language tokens by type (verbs, nouns, etc) making no sense sure rings home after a while. But I found very much use of “colour”+ themeing for two things: - comments vs code, one toned down vs the other, ideally swappable with a hotkey - delimited content such as strings. It sure saves a lot of time when you get an imbalanced delimiter nested in a forest and the whole of your file changes colour starting near the imbalance. I’m very much of the opinion that a lot of syntax highlighting is just dumbed down token matching and badly designed (if at all designed), when it should be much smarter in alerting you of inconsistencies, and putting relevant content forward. + by colour I don’t necessarily mean literally in colour, bold or italics can serve well.
- mannykannot 6y agoI have seen some C code so heavily #ifdef'ed that toning down the parts that are excluded in the current build would be helpful.
- strogonoff 6y agoI am looking forward to smart highlighting that does what you say (marking errors and inconsistencies, like perhaps a truthiness check being used with a variable that could be both null and undefined in case of a typed language) and otherwise is based on context (for example, highlighting a variable that was defined in outer scope is something that could be legitimately useful). Colouring human language by tokens is a very fitting analogy.
- mannykannot 6y agoCount me as another. I find syntax highlighting to be distracting unless it is done with some restraint (which it rarely is), and not helpful enough for me to bother with coming up with my own scheme or searching for one that I like. I am sure there are corner-cases where I would want to enable it, such as were someone has been in the habit of commenting-out parts of a line. I don't know anyone who uses syntax highlighting for natural-language prose, though I suppose there are some who do.
- bawolff 6y agoYay im not alone! I've always found syntax highlighting super distracting, but everyone i have met thinks im crazy. Otoh i do love me line numbers.
- SoSoRoCoCo 6y ago> But then I also code with syntax highlighting off about half of the time. Wow, don't ever use VSCode then! There are hovering diacritics and proofing marks everywhere! It does real-time syntax checking and quick compilation to check interfaces (at least with TypeScript, JS, HTML, pug, css, Vue, and NodeJS). I resisted fancy editors for years, as I found them crazy annoying, but over the past few months I've grown to adore VSCode because it has made me about 50% more efficient: I don't have to run the app to find errors, the IDE finds them for me, and it works on Win10, macOS and Linux. It is extremely context aware of my project. It's like JetBrains but free (or Android Developer Studio, also made by JetBrains...).
- strogonoff 6y agoI actually use VSC in Vim mode for TypeScript work as I couldn’t get Vim to nicely show verbose deeply nested typing hints (maybe someone knows a way?). There is a “mono white” theme, it still shades a few keywords in grey but otherwise is pretty good.
- MinusGix 6y agoHah, I'm the exact opposite. Greatly enjoy very colored themes, but it feels like almost all themes are about 50% white text with only a handful of things colored.
- UI_at_80x24 6y agoI set F12 to toggle line numbers off/on. Very quick and handy. :nmap <F12> :set invnumber<CR>
- mssundaram 6y agoI have the default register mapped to the system clipboard so doing yank in vim I can paste into anywhere else - no need to use the mouse or worry about line numbers " mac clipboard {{ if has("clipboard") set clipboard=unnamed endif " }} mac clipboard
- scooble 6y agoIf your vim is compiled with the correct flag for GUI operations (I forget which), you can yank/delete text into the * or + registers to make it available to the system clipboards. This won't bring the line numbers, and lets you avoid using the mouse.
- alpaca128 6y agoI think it's just called +clipboard. And with the setting "set clipboard=unnamedplus" Vim will use the system clipboard for yank, delete and paste by default.
- SoSoRoCoCo 6y agoI use vim in a terminal, the way the gods intended, not gvim. ;-P But apparently according to peer comments, there are ways to yank into clipboards, which is pretty cool.
- Lio 6y agoNot only that but if you set your mouse up correctly then you can use the mouse for selections and have it respect window splits too. That works in tmux too. So you can have use the terminal but have it behave as a GUI app in most respects. For example being able to use a touchpad to quicly enlarge/resize splits or scroll a window can be quite useful.
- scooble 6y agoThis works with standard vim in a terminal as well. I too follow the old gods.