Vim 8.0 Released! (google.com)
Long-time Slashdot reader MrKaos writes: The venerable and essential vim has had it's first major release in 10 years. Lots of new and interesting features including, vim script improvements, JSON support, messages exchange with background processes, a test framework and a bunch of Windows DirectX compatibility improvements. A package manager has been added to handle the ever-growing plug-in library, start-up changes and support for a lot of old platforms has been dropped. Many Vimprovements!
Emacs releases an upgrade and vi has to do the same. Ooh.
But does vim have a sex toy app? Never mind linux...
C|N>K
We'll leave you guys to write a text editor. Leave the rest of the OS to us, ok?
Npt using it if it can't play youtube videos.
http://michaelsmith.id.au
23 comments on Emacs and 4 on Vim?
Do you have ESP?
https://xkcd.com/378/
Screenshots please.
"MS-Windows DirectX support"
Wait, what?
Emacs and VIM got updates. I'm waiting for Microsoft to update Edit.
Although it may not look right, its is the correct word here. It's always means "it is." If "it is" doesn't make sense, then use its instead.
Vim is my main editor (aside from WebStorm) but it still has a few design flaws.
* You can't bind different operations to TAB and Ctrl-I because Vim thinks they are the same.
* Can't bind Ctrl-1 through Ctrl-9
Still, a new version is awesome.
I'm gonna try and compare visual code to vim and emacs and see how it stands out.
Emacs is a great operating system, it just needs a good editor.
whats next? the year of the Linux desktop?
i hope so, i am tired of waiting for it to get here, now i have kernels to compile
Politics is Treachery, Religion is Brainwashing
I use vim everyday and I've been an emacs user. Major release the same day. And that's not Fools Day. Funny.
* You can't bind different operations to TAB and Ctrl-I because Vim thinks they are the same.
That's because they are the same. I is 0x49, ASCII-wise, Control masks the 6th bit, giving you 0x09 for Control-I, which happens to be HT (horizontal tab).
* Can't bind Ctrl-1 through Ctrl-9
That's because there are no corresponding control characters. You have Control-@ through Control-_ and the 30 others inbetween.
CLI paste? paste.pr0.tips!
You do realize it t isn't 1963 anymore, right? Every modern text editor has no problems telling the difference between every combination of Shift, Ctrl, Alt / Option and some other key.
That's one of the design faults with ASCII: it only encodes partial Ctrl key combinations --- WTF.
Because we're stuck with a shitty standard no one wants to fix the the problem 50+ years later?? Instead we end up with a gimped text editor that can't even tell the difference ALL the permutations between:
* 1
* Ctrl-1
* Alt-1
* Shift-1
* Ctrl-Alt-1
* Ctrl-Shift-1
* Shift-Alt-1
* Ctrl-Alt-Shift-1
The fact that Vim can't even bind Caps Lock, again, like almost every modern game can, is BUG, not a feature.
I just wish Vim would get with the program and realize it is 2016.
It is almost enough to force one to use another editor. The problem is all the other editors suck even more. i.e. They don't understand's Vim's modal execution modal at all and the power it provides.
Just out of curiosity - what are you using the ctrl combinations for? Am I missing something extra in vim?
My ism, it's full of beliefs.
vi is a great editor :wq :Q :q
Slashdot, fix the reply notifications... You won't get away with it...
Maybe give Neovim a look then.
Games usually capture the keyboard to emulate a gamepad or similar. You really don't want your editor to operate that way for a couple of reasons that should be self-evident with a little thought. If you want to do something like rebinding capslock the best place to do that is the window manager or OS.
> what are you using the ctrl combinations for?
Having used almost every word processor and text editor under the sun since the 80's I've tried every combination of keys for cursor movement.
e.g.
* ^E ^S ^D ^Z (Wordstar)
* Arrow keys
* WASD
* WXAD - Robotron
* HJKL - I *hate* Vim's default cursor movement keys.
* IJKM
* IJKL - I find this is natural for me -- it comes from the Apple 2 game: Lode Runner
Before I switched to Vim (almost) exclusively ~5 years ago I used to use Windows text editors such as MSVC's IDE and Notepad++. I grew to like the Ctrl-* to move the cursor, and Ctrl-Shift-* to extend the selection -- this is something I've missed in Vim.
I use IJKL for character movement along with Ctrl IJKL for screen movement which means I can't use Tab and Shift-Tab for insert a literal TAB (say for Makefile) and/or indent / unindent . The work-around is to use the slightly awkward Shift to indent/indent and and Ctrl-Q Tab to insert a literal tab respectively. This works but I find it clunky.
I _would_ use Ctrl-# for bookmarks, and Buffer Management, along with other macros I use daily.
It's retarded that in 2016 I'm still fighting with a text editor to recognize basic hotkeys.
> Am I missing something extra in vim?
I don't know your preferred hotkeys and shortcuts so I can't say. Probably not.
I'm very fussy about keyboard customization and optimization of minimal keystrokes -- which is the main reason I love Vim's modal style.
Vim is like 99% close to perfection for me. Just wish it wasn't stuck at 99%.
Thanks for the suggestion ! Definitely checking this out!
> You really don't want your editor to operate that way
Yes I do.
I'm NOT talking about having EVERY permutation of 102 keys. That would be stupid.
I only need the *basic* ones. You know, the last 8 permutations:
Key Alt Control Shift
0 0 0 0
0 0 0 1
0 0 1 0
0 0 1 1
0 1 0 0
0 1 0 1
0 1 1 0
0 1 1 1
1 0 0 0
1 0 0 1
1 0 1 0
1 0 1 1
1 1 0 0
1 1 0 1
1 1 1 0
1 1 1 1
This isn't rocket science. Just basic UI design hampered by idiotic choices 50 years ago.
Were did you get that editor? 1977?
That's one of the design faults with ASCII: it only encodes partial Ctrl key combinations --- WTF.
The bigger WTF is thinking that ASCII is supposed to represent keyboard keys. You don't even need to consider combinations, Caps Lock isn't in ASCII either. But that's logical; ASCII encodes characters. 'A' does't equal the key combination shift-a, it could also have been typed using Caps Lock, but either way you get 0x41.
Of course, there's an obvious relation: keyboards are for text entry, and ASCII is for text storage.
Are you bragging or complaining
I feel your pain. I bypass the whole issue by mapping CAPS+IJKL to be cursor keys at the xwindows level. Then they work in (almost) any program.
Interesting kludge!
Unfortunately I need a solution that works across Linux, OSX, and Windows since I use Vim on all 3 platforms.
I have an autohotkey script that does the same sort of mapping in windows. It doesn't work in all dialogs but it works in most apps (including vim). I haven't really tried any keyboard hackery in OSX
I use IJKL for character movement along with Ctrl IJKL for screen movement which means I can't use Tab and Shift-Tab for insert a literal TAB (say for Makefile) and/or indent / unindent . The work-around is to use the slightly awkward Shift to indent/indent and and Ctrl-Q Tab to insert a literal tab respectively.
I see. I don't mind the arrow keys, however I use pg up/dwn, home/end in combination with Ctrl. Ctrl+left/right yields a word progression as opposed to character progression. So I press Ctrl for large movements and arrows for character movements. I think there are a few more I use unconsciously as well that don't come to mind immediately.
I'm very fussy about keyboard customization and optimization of minimal keystrokes
I very with you on this. I think it's important because it is the limiter on the throughput you have to your machine, fatigue and injury using a computer, in my experiences.
I don't remember when it happened, however the left or right click terminology for mousing stuck when users were trying to understand how to use a computer en masse, however it doesn't translate to the left side of the body. For context, consider using a right handed mouse. The right hand index finger is on the left button called 'select' and right button is called 'context' or 'menu'. The middle button is called 'middle' and introduced paste, then later scroll wheel and left/right. Now consider the same thing with a left handed mouse, left and right click no longer makes any sense.
I realised this when I first helped left handed users get set up ergonomically. Later injury forced me from being a right hander to left for some time and I got to experience their frustrations. I ended up ambidextrous (and a pretty good drummer), so I use two mouses to satisfy the ergonomics I have requirements to avoid re-injury.
I don't know if that is formally defined somewhere or I've unconsciously picked it up along the way, however to communicate it specifically during training sessions, I started referring to them as 'select' as index finger click, middle as middle finger click and 'context' as outside finger click, so that it makes sense to left handers as well.
The reason I told you all that is..
This works but I find it clunky.
If I may offer a suggestion, you may find some favourable vim functionality by using it with cygwin/X term, it's (DEC VT100) vs (ansi) terminal type. So when manipulating text an index click positions the cursor, a double index selects a word or a begins a drag to select, and a triple click selects a line (as normal). However you add the middle click and that becomes your first paste buffer, which is also a visible buffer.
Find the right terminal type (like xterm under linux) and vim will support the scroll wheel to page text, the mouse to position the cursor which *might* help the issue you are facing .
-- which is the main reason I love Vim's modal style.
When you add text in the edit mode of vim then select an add or insert at a certain position you can continue to select and paste text into the edit point by only using index and middle clicks. It is a simple, but powerful facility that I use in combination with command mode. For example apply the same regular expression over a range on some things over a number of files by middle click and y/n, :'a,'b g/expression/ s/find/replaced/gc :wn
I _would_ use Ctrl-# for bookmarks, and Buffer Management, along with other macros I use daily.
Interesting. I tried Ctrl-#, but I'm not sure how it should work? Would you mind sharing what I am missing?
I don't know your preferred hotkeys and shortcuts so I can't say. Probably not.
I use bookmarks, however I think I might be using vim differently. First I use "m" (for mark) and then a upper
My ism, it's full of beliefs.
Huzzah for my favorite new feature! I've been waiting for this since before 7.0 came out, and it finally did... a display-only (not newline-inserting) line wrapping mode that preserves the current indentation level. It's called "breakindent".
> so I use two mouses to satisfy the ergonomics I have requirements to avoid re-injury.
2 mice? wow! I had been wondering if anyone was crazy enough to try that. Sorry to hear that you were forced out of necessity but it sounds like you had no choice.
Have you tried any of those?
* wrist "gel" supports?
* wrist brace / supports? https://www.amazon.com/ACE-Del...
I am curious about your feedback / thoughts.
> I think it's important because it is the limiter on the throughput you have to your machine, fatigue and injury using a computer, in my experiences.
Definitely. Everyone's body has a "natural" way of doing things. If you are constantly spending time fighting it, then maybe it is time to either a) customize the editor, or b) change editors
> I started referring to them as 'select' as index finger click, middle as middle finger click and 'context' as outside finger click, so that it makes sense to left handers as well.
Excellent context-neutral descriptions !
> I ended up ambidextrous (and a pretty good drummer),
o7 One (practice) drummer to another ! I'll have to tell you about my acoustic-to-electronic kit conversion one day.
> If I may offer a suggestion, you may find some favourable vim functionality by using it with cygwin/X term, it's (DEC VT100) vs (ansi) terminal type. So when manipulating text an index click positions the cursor, a double index selects a word or a begins a drag to select, and a triple click selects a line (as normal). However you add the middle click and that becomes your first paste buffer, which is also a visible buffer.
All good suggestions !
Unfortunately I don't use the mouse with Vim except in a few odd cases.
>> I _would_ use Ctrl-# for bookmarks, and Buffer Management, along with other macros I use daily.
> Interesting. I tried Ctrl-#, but I'm not sure how it should work? Would you mind sharing what I am missing?
Sure! Currently Ctrl-1 .. Ctrl-0 _don't_ work _at all_ in Vim. :-(
If they DID, I would probably use Ctrl-1 .. Ctrl-3 as a quick way to switch between buffer 1, 2, 3. (or the 3 current open files)
>> I don't know your preferred hotkeys and shortcuts so I can't say. Probably not.
>> I use bookmarks, however I think I might be using vim differently. First I use "m" (for mark) and then a upper or lower case letter to set a bookmark. Then ' (a single quote, followed by the letter. So 'mq' and 'mQ' can set two different locations which are accessed by 'q or 'Q. Sure I am limited to 52 bookmarks, however I have rarely used more than 30. Obviously you can then use that to set up ranges to cut, copy paste, use regular expressions on or apply functions to.
Yes, I use m (mark) and ' (goto) as well ! The problem is once you have more then 3+ bookmarks it becomes hard to remember "where" each bookmark takes you. i.e. What is the Spatial Location? I have an easier time using digits then letters. Let me explain:
While mA and mZ are obvious that they are near the top and end respectively, using mW mS and mX is _not_ obvious on their spatial location. Sure S < W < X but WHERE roughly are these 3 set ??
S=19, which is 16/26 = ~62%
W=23, which is 23/26 = ~89%
X = 24, which is 24/26 = 92%
If I could use the Ctrl-# I would use the bookmark as a mnemonic to remember roughly WHERE in the file it is.
i.e.
I would bookmark Ctrl-1, Ctrl-2, Ctrl-3 near the top of the file
I would bookmark Ctrl-4, Ctrl-5, Ctrl-6 near the middle of the file
I would bookmark Ctrl-7, Ctrl-8, Ctrl-9 near the end of the file.
Using the examples above I would use:
Ctrl-6
Ctrl-8
Ctrl-9
See which one is easier to remember? I no longer have to play the guessing game of "Where is bookmark X located again?"
Currently, my kludge is to split the window (horizonta
Comment density jokes don't work well for normal people.
2 mice? wow! I had been wondering if anyone was crazy enough to try that. Sorry to hear that you were forced out of necessity but it sounds like you had no choice.
Well, I'd been swapping the mouse left hand for a few weeks, the right hand for a few weeks for so long I began to notice it was the combined, click and mouse move that were fatiguing and provoking injury. Examining at my usage habits again I realised the cost of two mouses is really cheap ergonomic protection and less than the cost of a single physiotherapy session.
When I tried it, it was confusing at first, then incredibly liberating. At least for me. As I got better it improved endurance and throughput on a machine, like this was the way it was supposed to work all along. I have two configs dual mouse and dual trackball. You find yourself mousing on one hand and button on the other and dual mousing. As for reptitive movements, using both distributes the muscle movements arcoss both hands. So a 'select' and drag, for example, the click muscle is on one hand and the movement muscle is in the other hand.
The dual trackballs are great for music production and dual mouse works great for coding.
Have you tried any of those?
Yes.
I used them quite a lot when healing injury on different joints. I found it is the heat, as opposed to the pressure, that helps it heal. The little colds spots are bad, and slow healing. I used the ones without a strap to keep the heat in at the joint and keep it in place.
No matter which ones you use the advice I received about them (physio/chiro/doctors) was to only use them at night so that the body doesn't get dependent on them being there. If you do it has the reverse effect and makes the joint weaker, exacerbating the pain over time.
I did that and found if you keep the warmth on the joint while you sleep and take it off during the day the ligaments and joints heal pretty well. They should be a bit sweaty by morning. Take them off, store inside out during the day to dry. Wash them once a week otherwise they get really stinky.
Don't be afraid of wrist or finger cavitations during the day, its part of the healing proccess.
I think I wore them for about two years and now I dont need them anymore.
These are close the ones I used: https://www.amazon.com/Thermos... though mine didn't have the velcro.
Hope it helps - I know how it feels to need those things.
Definitely. Everyone's body has a "natural" way of doing things.
I'll probably be going through it again. The neck surgery means I will be reveiwing screen position again and reviewing other usage habits.
Excellent context-neutral descriptions !
Thank you.
I'll have to tell you about my acoustic-to-electronic kit conversion one day.
sweeeet! I love those things.
My ism, it's full of beliefs.
All good suggestions ! Unfortunately I don't use the mouse with Vim except in a few odd cases.
Interesting. Its probably my compromise with the ui.
If they DID, I would probably use Ctrl-1 .. Ctrl-3 as a quick way to switch between buffer 1, 2, 3. (or the 3 current open files)
That is a good idea. :rew, ^, :wn is about the limit I could find to get close to that.
The problem is once you have more then 3+ bookmarks it becomes hard to remember "where" each bookmark takes you.
I see what you mean. My approach maybe odd, I use conceptual references. So 'D or some other letter might be an abstract of something and the lowercase 'd maybe a concrete implementation. other odd games too help. Generally when I code though I try to limit the size of the files I create.
See which one is easier to remember? I no longer have to play the guessing game of "Where is bookmark X located again?"
You're right - it's a pita.
I think that's where I get the GUI to take over. Generally a combination of screens, workspaces, bash/vim terminal sessions, IDE. 4-8 workspaces and in my set up the terminal tabs hotkey with Alt-1 Alt-n. That generally gets me huge task bandwidth, about 4-400 vim/bash sessions per workspace.
Also I use workspaces named that define tasks in layers, so on my DAW for example I have Mix-Master-Monitor-subsystem, for code I generally use UI-Domain-Persist-DB and just increment whatever needs expansion. That's my workflow management, you probably have different challenges.
I think there maybe a way for you though, maybe multiple vims open on a single file - whaaaa? I hear you say. Well I think the new messaging part of vim may provide a way for multi-vim sessions on a single file by passing messages (which can be edits) between each other. I'm not sure yet (I still have a fair bit of recovery and exercise in from of me) but this could be a possible use-case that this new feature *might* support if you wanted to check it out.
Using "# command"
The curiosity is killing me, as soon as I get a chance to figure out how this works I'm going to have to try it on something. Generally I just rack my brains making new regexs. I clearly am still learning vim!
(At the time we worked on a C++ compiler but that's another story.)
Respect.
In the process of understanding Vim I tore into the source code and literally made a map of what EVERY key does in Vim.
Cool. I've probably been using vim longer than you, actually, it was vi for a long time on sco, sun, hp. But ripping into the source code to learn it is pretty hard core. I'm certain you've gone beyond me with it.
(If you search for "Vim Cheat Sheet" you'll come across my work.) i.e. https://www.google.com/search?... [google.com]
Damn man, that's awsome work. I doubt I know how to use vim as well as you do. I'll be laminating a copy of this for my wall - my colleague will want one as well, he only just got hooked on vim about a year or two ago.
That's really the best functional breakdown of vim I've seen and I'll spend some time studying it. Thank you for doing that.
Vim felt like an extension of my mind !
Obviously, this reply was constructed with vim - it's great for getting thoughts collated pre post.
I posit this is because Vi (and Vim) was designed by a programmer for a programmer. Every key feels like it belongs there. There is no wasted key. Sure Vim's learning curve is like a vertical cliff, but man, what a view from the plateau ! You'll never view another editor the same way one you've seen and tasted the power of Vim.
Absolutely! I suspect it maybe some time before we get everything out of the new features, and I'll probably be trying to figure out what I am missing with vim from your work - thanks.
My ism, it's full of beliefs.