3 ms·
> sensible defaults > a tabline on top I don't have anything against all these "default configurations" for vim (even though I'm struggling to imagine, why th
by krick 3y ago
> sensible defaults
> a tabline on top
I don't have anything against all these "default configurations" for vim (even though I'm struggling to imagine, why the kind of person who doesn't want to configure vim himself would choose vim in the first place), but this line just made me chuckle.
- doix 3y agoYeah, I don't think "sensible defaults" is correct. More like "my defaults". How do you split if ctrl+w is cut word instead?
- csdvrx 3y ago> How do you split if ctrl+w is cut word instead? Before I tell you how, I want to tell you the 2 reasons why I don't like splitting with Ctrl-W: 1) because I think Ctrl-W should the same thing as on readline or emacs 2) because even if existing uses of Ctrl-W were removed from the picture, splitting with Ctrl-W use 3 keys. Why use 3 keys when you can use 2? I like short sequences, and chording, and there are many 2 keys sequences that are free to use if you know where to look for: I prefer to use what can only be done with MOK sequences, because these sequences are more likely to have a degree of redundancy. For example, Ctrl-I duplicates Tab: if you use a MOK you can have Tab do something (indent) while Ctrl-I does something else (jump in the edit history). Ctrl-I is "free to use" without limiting function, because keyboards generally have a Tab key. These are "sensible defaults", because most people do that in other editors. My splits are mapped to MOK sequences (Ctrl-; Ctrl-' Ctrl-\ Ctrl-/ Ctrl-`) but I've thought it may not be a good idea because 1) it's more unusual and 2) I rarely use split in vim so I don't think I can make an educated choice besides having Ctrl-T start a new tab (like it does on a browser), so I've left them out: I've just left the "echo" part. If splitting is important to you, and you want to try out these MOKs, search for "echomsg.*was hit" and bind your windows split around line 256. I would like to know what you think of these. I may trust your judgement more than mine, if only because I don't use splits much in vim. If you think these MOKs does the job for you, and if you think splits are important, let me know and I'll add the split mappings to the defaults for the next release (EOY, it may include a CuteBash)
- doix 3y agoI'll be honest, I just took a bit of offence to the "sensible defaults" wording. I think there probably are some things you can do in vim that the vast majority would agree with. But I think you've gone a wee bit too far into just making it your preferences. I totally get your logic by the way, I'm just not convinced it's strong enough to be considered a "sensible default" ;). You're not wrong that it's 3 keys instead of 2, but I find it makes sense. Ctrl-w puts you in (w)indow management mode and then you split (v)ertically or (h)orizontally. I don't split often enough that it matters. I do remap ctrl-w+h/j/k/l to just ctrl+h/j/k/l since I do move around in my splits that saving a keypress does matter. > My splits are mapped to MOK sequences (Ctrl-; Ctrl-' Ctrl-\ Ctrl-/ Ctrl-`) They make no sense to me. I have no idea what any of those key combos do. FWIW, I see you said that it was a bit of a joke in another comment. Maybe I'm just grumpy because I'm sick during the holiday season :(. Also for what it's worth, the general idea is super cool. I love seeing all the cool things cosmo enables
- csdvrx 3y ago> I'll be honest, I just took a bit of offence to the "sensible defaults" wording. Then I have to apologize for the bad joke. I wanted to show cute and inspiring things, that would make people smile during the holidays, not offend people with bad jokes. > They make no sense to me. I have no idea what any of those key combos do. It's made to evoke what the result will look like, based on the characters on the keys (like ; is a thing above the other, so it evokes vertical split) However, I feel Ctrl-T should be the default to create tabs (since that's how anyone does in the browser, while Ctrl-Shift-T reopens) so I'm not sure about how to mix and match all that (+ my lack of use of vim splits) to select defaults that'll give a great experience. > Maybe I'm just grumpy because I'm sick during the holiday season :(. Then get better and let's talk about shortcuts later! Someone who likes window splitting and care about vim shortcuts in vim could help a lot!
- laktak 3y ago> 1) because I think Ctrl-W should the same thing as on readline or emacs OK, but as a vim user you would switch readline to vim mode and never look back ;)
- sodapopcan 3y agoAs pointed out in other comments, the vimrc isn't really the key part of this project. Of course, calling these "sensible defaults" is maybe a bit antagonistic, even if it wasn't meant that way, and draws too much attention to it. I will say that the "tab" line is a super useful feature. For anyone not using it, look into it! Hint: you don't have to use it for tabs at all. It's a great place to stick any persistent info that is global to the current Vim instance. And of course you can tweak it to conditionally display whatever you want. Much like this repo does, when I did a lot of pairing at my last job, I stuck the current file name up there because that is where my coworkers were used to looking.
- csdvrx 3y ago> Of course, calling these "sensible defaults" is maybe a bit antagonistic, even if it wasn't meant that way, and draws too much attention to it. It's a bit of a joke, it's intended to make you laugh like when I say to go buy an OLED screen instead of commenting out a specific line :) But TBH it's only half a joke: I think not supporting selection with Shift and Control+Shift+Arrows may drive intermediate users away. > I will say that the "tab" line is a super useful feature Absolutely! Like you, I've also noticed the tabline (and the line numbers) helps when I'm showing files to other people. Even if everything else I consider sensible defaults (rainbows! emacs/readline like chording shortcuts everywhere! selection with the arrows, shift and control!) doesn't popular, I hope the tabline with X,Y coordinates and hex position will.
- sodapopcan 3y ago"antagonistic" wasn't the exact right word... like, the same word but less strong, lol. > I think not supporting selection with Shift and Control+Shift+Arrows may drive intermediate users away. I actually don't have anything like this to move words around! I use `]e` and `[e` from tpope's unimpaired [0] for moving lines around (I use tons from that plugin). I may toy around with some word-moving mappings. I do agree with readline everywhere! I'm on mac and have it configured so readline works in all apps, lol. Again with the tpope plugins, vim-rsi is a great plugin and I very much agree with its premise: I love the stand vim bindings in command mode but when in some kind of "insert" mode, even outside of vim, I want readline! [0] https://github.com/tpope/vim-unimpaired https://github.com/tpope/vim-unimpaired [1] https://github.com/tpope/vim-rsi https://github.com/tpope/vim-rsi