I find it odd that you would use the short version of a command in a config file. Brevity is important when you are doing repetitive tasks. In a config file (or code), clarity is more important that brevity. I know you could argue that you know VI so well that you know these commands off the top of your head.. even so, it's particularly pointless to list them this way in a blog where you have to turn around and expla…
Five lines I put in a blank .vimrc
51–60 of 133 posts
Re: Five lines I put in a blank .vimrc
#52Earlier quoted context omitted.
I 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.
Very 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?
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.
Re: Five lines I put in a blank .vimrc
#53Why not one line? set hls ic is nu noswf On a serious note, personally disabling line numbers is the first thing I do in a new editor. Reduces visual noise—status line usually shows current line number anyway, jumping to a line might take a second and I found I don’t need to know my line numbers more frequently than once per month or so. What I do like to enable in an editor is visible whitespace characters (helps no…
Line number are super helpful for navigating in vim, though. :54 when you’re on line 20 is much faster than any alternative.
Re: Five lines I put in a blank .vimrc
#54Why not one line? set hls ic is nu noswf On a serious note, personally disabling line numbers is the first thing I do in a new editor. Reduces visual noise—status line usually shows current line number anyway, jumping to a line might take a second and I found I don’t need to know my line numbers more frequently than once per month or so. What I do like to enable in an editor is visible whitespace characters (helps no…
Line numbers are great, until you try to cut and paste. But then again, VI/M wasn't designed for GUIs.
:nmap :set invnumber
Re: Five lines I put in a blank .vimrc
#55I find it odd that you would use the short version of a command in a config file. Brevity is important when you are doing repetitive tasks. In a config file (or code), clarity is more important that brevity. I know you could argue that you know VI so well that you know these commands off the top of your head.. even so, it's particularly pointless to list them this way in a blog where you have to turn around and expla…
Yes, I definitely am much descriptive for the config file on my personal computer. The configs I'm recommending here is more for ephemeral machines that you are using just to look at files (such as sshing into a VM that was created to run integration tests). For those cases, being able to quickly type something into the .vimrc and improve your experience is nice.
Re: Five lines I put in a blank .vimrc
#56nmap ; :
Re: Five lines I put in a blank .vimrc
#57 view foo # opens read-only, no swap file
vi foo # opens read-write
Another benefit of this habit is, if you know you're not going to want to modify a file, you can protect yourself against errors like accidentally changing something and then absentmindedly saving the file.Re: Five lines I put in a blank .vimrc
#58Kinda derailing the thread but might ask anyway, does anyone got recommendations on dot files synchronization through personal devices? I'm currently using a git+ss repo on a personal server. I wonder if there are more convenient ways to do this.
This is useful because sometimes you want to use the same configuration file on different systems and they usually need some customizations to adapt to each one, which can be done automatically by ansible based on jinja2 templates.
Re: Five lines I put in a blank .vimrc
#59Why not one line? set hls ic is nu noswf On a serious note, personally disabling line numbers is the first thing I do in a new editor. Reduces visual noise—status line usually shows current line number anyway, jumping to a line might take a second and I found I don’t need to know my line numbers more frequently than once per month or so. What I do like to enable in an editor is visible whitespace characters (helps no…
Line numbers are great, until you try to cut and paste. But then again, VI/M wasn't designed for GUIs.
" mac clipboard {{
if has("clipboard")
set clipboard=unnamed
endif
" }} mac clipboardRe: Five lines I put in a blank .vimrc
#60Earlier quoted context omitted.
Line number are super helpful for navigating in vim, though. :54 when you’re on line 20 is much faster than any alternative.
I would type "8j8j8j8jjj". I type "8j" (and "8k") a lot.
It's not pretty, one could argue that the mouse is more efficient for such movements, but for me it's faster in practice than moving my hand to the mouse/trackpad, or than looking up a line number (either absolute or relative) and then typing it. And it has no mental burden.