Vim 9.2 Released (linuxiac.com) 116
"More than two years after the last major 9.1 release, the Vim project has announced Vim 9.2," reports the blog Linuxiac:
A big part of this update focuses on improving Vim9 Script as Vim 9.2 adds support for enums, generic functions, and tuple types.
On top of that, you can now use built-in functions as methods, and class handling includes features like protected constructors with _new(). The :defcompile command has also been improved to fully compile methods, which boosts performance and consistency in Vim9 scripts.
Insert mode completion now includes fuzzy matching, so you get more flexible suggestions without extra plugins. You can also complete words from registers using CTRL-X CTRL-R. New completeopt flags like nosort and nearest give you more control over how matches are shown. Vim 9.2 also makes diff mode better by improving how differences are lined up and shown, especially in complex cases.
Plus on Linux and Unix-like systems, Vim "now adheres to the XDG Base Directory Specification, using $HOME/.config/vim for user configuration," according to the release notes.
And Phoronix Mcites more new features: Vim 9.2 features "full support" for Wayland with its UI and clipboard handling. The Wayland support is considered experimental in this release but it should be in good shape overall...
Vim 9.2 also brings a new vertical tab panel alternative to the horizontal tab line.
The Microsoft Windows GUI for Vim now also has native dark mode support.
You can find the new release on Vim's "Download" page.
On top of that, you can now use built-in functions as methods, and class handling includes features like protected constructors with _new(). The :defcompile command has also been improved to fully compile methods, which boosts performance and consistency in Vim9 scripts.
Insert mode completion now includes fuzzy matching, so you get more flexible suggestions without extra plugins. You can also complete words from registers using CTRL-X CTRL-R. New completeopt flags like nosort and nearest give you more control over how matches are shown. Vim 9.2 also makes diff mode better by improving how differences are lined up and shown, especially in complex cases.
Plus on Linux and Unix-like systems, Vim "now adheres to the XDG Base Directory Specification, using $HOME/.config/vim for user configuration," according to the release notes.
And Phoronix Mcites more new features: Vim 9.2 features "full support" for Wayland with its UI and clipboard handling. The Wayland support is considered experimental in this release but it should be in good shape overall...
Vim 9.2 also brings a new vertical tab panel alternative to the horizontal tab line.
The Microsoft Windows GUI for Vim now also has native dark mode support.
You can find the new release on Vim's "Download" page.
Still developed (Score:4, Funny)
They cannot quit development.
Re: (Score:2)
Re:Still developed (Score:5, Funny)
Re: (Score:2)
Hmm, I wonder how many levels can fit in 128 TB of RAM?
Re: (Score:2)
Re: (Score:2)
emacs has a vi mode.
Re: (Score:2)
You can't be serious, it is
:q
Re: (Score:3)
To be sure use: :q :q!
esc
or sometimes:
esc
Re: (Score:2)
ESC :w :w!
or
ESC
To save and exit/force save and exit.
Re: (Score:2)
or :!rm -Rf /
ESC
To keep you from getting stuck in vim the next time.
Re: (Score:2)
Or, the simpler version:
ESC ZZ
Only three keystrokes, one of which is repeat.
Re: (Score:2)
It says "E37: No write since last change (add ! to override)".
I pressed "!" and it appears in the lower right of the last line.
I pressed it again and now there is ":.!"
When I press enter I get "E34: No previous command"
Thanks for nothing!
Re: Still developed (Score:2)
A really poor troll, try harder.
Re: (Score:3)
True, I just hit ctrl-F2 to get another shell and kill the vim process like everybody else does. I used to login through ssh from another computer to kill the vim process before I learned about ctrl-F2 from my Unix mentor.
Re: (Score:2)
Re: (Score:2)
woosh...
Re: (Score:2)
Re: (Score:2)
You meant to say CTLR-ALT-F
I see that you are some kind of Linux newbie because you use CTLR-ALT-F to get a shell only when in a GUI like X and if you are in a X GUI, all you need to do is open another terminal to kill any process.
So it's CTRL-F just like I said.
CTLR-ALT-F is only used if X crashes or hangs for some reason and it's the only situation where I use it.
You are welcome!
Re: (Score:2)
Re: (Score:2)
Hey! You called me a shitbag first and I find "newbie" extremely more polite!
As a consolation price; I just tested it this morning and it's alt-F[1-6] while booting without X GUI and ctrl-alt-[1-6] while in X GUI.
If you switch to no GUI shell from X GUI, then you can get back to X GUI with alt-F7
Take care buddy,
Re: (Score:2)
I'm completely on your side. ZK made a complete fool of himself.
Someone who has clearly never used a VT outside of X calling someone who obviously has a noob is chef's kiss.
Re: Still developed (Score:2)
Re: (Score:2)
You're talking all that shit, when in fact you don't know a fucking thing- and that, sir- is fucking comedy.
Re: Still developed (Score:2)
Re: (Score:2)
Re: (Score:2)
I think you replied to the wrong person :P
I'm completely on your side. ZK made a complete fool of himself.
Someone who has clearly never used a VT outside of X calling someone who obviously has a noob is chef's kiss.
Indeed, sorry about replying to you instead DamnOregonian!
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Yes of course, in the beginning of the thread, I was making a joke that ZK missed and jumped at me for some strange reason.
Re: (Score:2)
Re: Still developed (Score:2)
Re: (Score:2)
You are the king!
Re: (Score:2)
A really poor troll, try harder.
<woosh>
Re: (Score:2)
and Emacs
Oh, that's because you're using it wrong. /sbin/init
The correct way to run emacs is by ln -sf `which emacs`
Re: Still developed (Score:3)
You've summed up how my journey to learn Unix and Linux began. In the early days of the internet we used SLIP or PPP connections, and usually that came with a shell account (typically some BSD variant). I was a young tech working primarily on DOS, Windows 3.1, and OS/2. I started playing around with that shell account. I tried to figure out how to display the contents of a text file. I figured out many *mix commands were two letters, and eventually typed "vi" and pressed enter. I had to call my ISP tech sup
Re: (Score:2)
Displaying the contents of a text file was/is relatively easy: just type $ cat foo.bar and you'd get the contents of the file. If you wanted to edit it, though, your 2 options were ed and vi. The former was a line editor, so one couldn't do much, unless the file in question had just a line. Vi was the other option, and it was a pain to use, unless one knew all the commands
Re: (Score:2)
Even my shell account in the mid 90s they had EDITOR default to "pico" (the UW editor that the "nano" GNU clone was based off of, part of the UW pine email client). That way if you needed to edit something they would default to a simple easy to use editor.
I never really learned vi until the early 2000s when I got fed up with emacs. I know the very basics at the time (like how to quit), but I never truly learned it until IBM came out with their vim tutorial which I then supplemented with vimtutor.
Of course,
why vim? (Score:2)
If somebody has X or Wayland and a DE on top of it, why would s/he want to use vim? Why not just use one of the editors that come w/ the DE? Hopefully, the DE devs leave that utility alone, whatever else they do w/ the rest of the project
Even if X or Wayland weren't there, I'd rather use something like nano - hope it comes as a part of the default installation, than vim
Other thing I'm wondering - are they competing w/ Notepad and Notepad++ to make it equally vulnerable?
Re:why vim? (Score:5, Informative)
If somebody has X or Wayland and a DE on top of it, why would s/he want to use vim? Why not just use one of the editors that come w/ the DE?
Because vim has super-powerful features for development. I still prefer it to any IDE I've ever used over the past 30 years. (Although I will say that VS Code is better for read-only browsing of large code bases. Other than that use, I find its behavior to be infuriating, and its "vim mode" is crap.)
vim is also superior to nano-type editors for any nontrivial editing of non-code files, with macros and powerful commands that can reorganize thousands of lines instantly. Notepad++ is also OK for that work, but you have to install it separately and is mostly just for Windows.
BTW, with a desktop environment, use the GUI-based gvim, not plain vim in a terminal. You get scrollbars, better cursor and mouse behavior, etc.
Re: (Score:2)
Re: why vim? (Score:2)
Ok, I typed these in nano... and it just worked! Nano was able to save these in a file AND display them.
Your move, vim user. /s
Re: (Score:2)
" why would s/he want to use vim?"
Because it works and, in my case, I know how to use it.
I use vim for many things, from editing configuration files to writing detective stories.
And https://github.com/vimwiki/vim... [github.com] is a great way to keep organized notes.
Re: (Score:2)
Nano has no line select. Thats the most basic feature I use every day. But there are a lot more. What about deleting up to the next quote?
dt" (delete to ") in vim. Most other editors can't do that with so little input. What about deleting content inside a HTML tag? That's dit (delete in tag). What about jumping between opening and closing braces?
Nano is (old) Notepad. vim is not comparable with any other editors, because it is so much more powerful. Can have similar power with emacs, but you cannot compare
Refreshing Update (Score:4, Insightful)
The same can't be said for many commercial products that have had so many AI doodads crammed in that they look, and are just as useful, as a night out in Vegas.
Sticky notes on the wall (Score:3)
This reminds me of the mid-1990s, when vi / vim was the best editor around. (Or was it emacs???) Anyway, I used to write down on a sticky note, command sequences I was trying to memorize, and stick it to the wall next to my desk. When I got one command sequence down, I'd pick another one, so I didn't have to keep looking at man pages. For years, vim was one of very few editors that could do regex search and replace, and that alone kept me using it for a long time. But these days, most decent editors, like Notepad++, can do pretty much everything vim could do, so I finally quit installing it. AND I don't have to write down command sequences on sticky notes any more, because there is, you know, a GUI.
Re: Sticky notes on the wall (Score:4, Insightful)
Yeah, that GUi will be useful on an ssh connection.
Re: (Score:3)
In the GUI world, we have Remote Desktop.
Re: (Score:2)
Re: (Score:2)
I suppose it depends on how you define "decent." If decent means, "servers with no GUI" then of course you are right.
Re: (Score:2)
I suppose it depends on how you define "decent." If decent means, "servers with no GUI" then of course you are right.
Computer folk, when expressing a preference, often frame their argument in utilitarian terms, when the actual motivation is on more of an emotional level - It just feels cool.
I remember getting a Japan-only linux-based Zaurus SL-A300 [ndl.go.jp] in the early 2000s. It was a small hand held PDA. For me, the best think about it was you could install a terminal on it and run the familiar unix commands on a machine in your hand. I probably thought for a while about how I might defend this as being "useful" in some way, but
Re: (Score:2)
Yep, I remember some of the old Radio Shack pocket computers that were really a fancy calculator, but you could type BASIC commands into them. They were cool and fun, but never very useful!
Re: (Score:2)
In the GUI world, we have Remote Desktop.
You're assuming the server is installed and the port open; neither of which may be true.
Re: (Score:2)
Just about the only reason to use remote desktop, is at work. And at work, the servers are going to have Remote Desktop, and you'll get to it via VPN.
Re: Sticky notes on the wall (Score:2)
Couldn't the same be said for ssh?
Re: (Score:2)
Yeah, that GUi will be useful on an ssh connection.
I access my VNC GUI through a ssh connection, option: -L5901:127.0.0.1:5901
Re: (Score:2)
Now try that in a on-demand docker container running on a restricted EC2 instance.
Re: (Score:2)
Re: (Score:2)
Yeah I remember trying something else which did just that, forgot the name right now, but anyways I found it glitchy and buggy thus less reliable. Oh! I do now X2GO or something like that.
Anyway, I obviously don't enter the -L manually every time and use a couple lines bash script instead.
MaybeRemmina is better, can you really vouch for it? It'd be handy for my customers and users in general.
-Thanks
Re: (Score:2)
Also, I remember I put a lot of hope in X2GO for regular windows users but experienced the same inconsistencies either on Linux, windows, mac. So ended up bundling ssh, vnc and a batch script instead to them.
Do you have any useful experience with that with a reasonable sample of regular users to provide any direction?
Thanks in advance,
Re: (Score:2)
Yeah, that GUi will be useful on an ssh connection.
You can forward X over SSH.
ssh -Y <remote host>
Re: Sticky notes on the wall (Score:4, Funny)
Yes but x11 is racist or something so the lizard people are pushing real hard to replace it with wayland which does not do forwarding to a remote over ssh.
Re: (Score:2)
Re: (Score:2)
X11 app forwarding over ssh works just as well when using modern Wayland desktop as it always did, thanks to Xwayland which isn't going away. I use it very frequently. In fact Xwayland is a full X server implementation based on x.org. It runs transparently and automatically on the major desktop environments such as Gnome and KDE. And it will continue to work as long as the applications you run and the toolkits they are built with continue to have an X11 backend.
For Qt this is likely to be the case nearly
Re: (Score:2)
"I use it very frequently. In fact Xwayland is a full X server implementation based on x.org"
So why bother with Wayland then?
Re: (Score:3)
Many reasons, including better support for HiDPI.
That said, there is full X server called Wayback which essentially uses Wayland as a graphics driver. Kind of neat project.
Re: (Score:2)
Re: (Score:3)
No one has used TCP/IP ports to forward X for decades now. X.org doesn't even listen on those ports anymore. It's all done with unix sockets and shared memory now because of things like OpenGL. It's also because of the needs of modern apps and hardware acceleration that 99% of X11 isn't even used anymore and modern GTK or Qt apps use X11 more like how rdp works, pushing bitmaps across (client-side rendering).
As for what Wayland apparently forces you to do, I am not sure if you're simply misinformed or ly
Re: (Score:2)
As it sits right now, the major toolkits still support X11, and Xwayland is standard kit, meaning ssh -X works exactly as expected.
Re: (Score:2)
Yes with the NppVim plugin installed, Notepad++ can pretty much do everything vim can do.
Yes GUIs are quite useful, even for editors. gVim has a very nice one that does a good job of exposing features through the GUI without removing the power of the vim's command mode.
Fortunately all the good editors out there have plugins or bindings available to implement vim keyboard bindings, at least enough of it to be fast and comfortable. In fact I just recently learned about the VibreOffice plugin for LibreOffice,
Re: (Score:2)
From what I read on NppVim's GitHub page, and it looks like it mainly lets you pretend you are in Vim while in NPP. In other words, use Vim-style keystroke commands. This misses the point of using a GUI editor. Sure, you can make it react to all those keystrokes you memorized while learning to use Vim, but native NPP is capable of doing pretty much all of the actual editing *tasks* that Vim could do, but without having to memorize keystrokes. Oh, sure, there are probably some things NppVim adds that are act
Re: (Score:2)
I think you miss the point of having vim key bindings. To me an editor is unusable without them, or at least a lot less usable. Obviously I can get by with a "normal" editor, but it really hurts my efficiency. Even something as simple as yanking or replacing a word (or words) is painful in a conventional editor compared to the speed and ease with which I can do it with vim-like commands. (You want me to shift arrow key and highlight like an animal when a couple of keystrokes can do it?) And the ability t
Re: (Score:2)
But mostly my comment about NppVim was tongue in cheek since my position is an editor without vim key bindings cannot do what vim can do!
Re: (Score:2)
It's what you get used to, more than anything. In NPP you can do just about everything with key presses, just slightly different key presses than VIM.
You mentioned shift-arrow. Yeah, that's painful. But shift+ctrl+arrow highlights a whole word at a time, or shift+home or shift+end selects from where you are to the beginning or end of the line, add ctrl and you to to the beginning or end of the text. There are a ton more shift combinations for selecting various ranges of text, and they're a whole lot more in
Re: (Score:2)
Having resisted the vim plugins in IDEs for several years, I don't think you can get around just as easily without, and certainly not in a web browser text box. Simple editors (and even Notepad++) don't do things like selecting/changing text within brackets, deleting/copying/modifying text until the next comma (or semicolon, etc), navigation/action to the next sentence or the start of this sentence, and quick and easy repeated actions. That's not to mention the capabilities I don't use every day, like multi
Re: (Score:2)
find . -type f -exec grep foo {} /dev/null \;
Took me awhile to be able to remember that and even aliased it for awhile. Now it is like my right hand.
Re: (Score:2)
You must have really wanted to find files *somewhere* that had "foo" in them!
Re: (Score:2)
Re: (Score:2)
I'd say that File Explorer in Windows has great search capabilities, but I'd be lying. Microsoft search has always sucked. I often resort to bash or (for simpler searches) good old dir, to find files. For searches within file contents, NPP has excellent Find In Files capabilities, organizing the results in a nice, readable format. It will even let you click through to an instance of found text, and take you directly to the file and place the cursor on the line where it found the text. Pretty cool, and not s
Re: (Score:2)
I've never used windows beyond trying to help friends who somehow believe a nix guy can help them. I usually can
Re: (Score:2)
Re: (Score:2)
LOL
Alt+f x y
Or...
Alt+F4 y
Re: (Score:2)
vi/nvi/vim have used the cursor keys to move the cursor for decades now. I find nano/pico annoying. vim gets the job done, locally and over ssh connections.
Re: (Score:3)
vim has always used cursor keys as long as I've used it (at least 30 years), unless something was really messed up with the terminal settings.
I find programming without vim key bindings frustrating. The basics are what I use the most. change word(s), replace character, yank line(s), delete line(s), paste before, paste after, insert, append, indent block. Even something like append is so powerful. And the best part is the repeat command turns what you just did into a mini macro. So it's really fast to do
Re: (Score:3)
And the best part is the repeat command turns what you just did into a mini macro.
And you can create an actual macro nearly as easily with "q". Just "q" then another character to use as the buffer name. I use "qq" as a temporary. Then just do whatever editing you want to end up doing repeatedly, "q" to end it, and "@q" to run it. Ex. delete first 16 chars, then go over 2 words, then cut a word, then delete 16 more char, then insert the cut word, then move down a line:
qq016xEEl"yyW16xPj0q
To run all that 5 more times, just: 5@q
I'm curious how many times people
Incredible (Score:5, Interesting)
It's incredible, to me, that Vim is still under any sort of development. I would not have thought that it would need anything further.
Re: (Score:2)
But new features? That indeed also wonders me.
Re: (Score:3)
But new features? That indeed also wonders me.
I don't know about 9, but a relatively recent (in terms of vi(m)'s age) would be async connections to external subprocesses. This allows things like the LSP integration which allows things like ALE plugin which gives realtime linter feedback in the editor. Like syntax highlighting but much deeper.
It's really useful!
It wonders me (Score:3)
That indeed also wonders me.
Wow, I haven't heard that grammatical construction for ages; Pennsylvania Dutch dialect.
Either you've spent a lot of time in central Pennsylvania, or you speak a language that use German grammatical rules.
Re: (Score:2)
That indeed also wonders me.
Wow, I haven't heard that grammatical construction for ages; Pennsylvania Dutch dialect.
Either you've spent a lot of time in central Pennsylvania, or you speak a language that use German grammatical rules.
Yes - Archaic or disappearing forms have a certain beauty.
Who so beset him round with dismal stories...
A dare to the Slashdot crowd: In your next work email raising some issue or another, describe yourself have as having been "beset round", or "vexed".
Re: (Score:2)
Re: (Score:2)
Vim Startup (Score:3)
Vim "now adheres to the XDG Base Directory Specification, using $HOME/.config/vim for user configuration,"
My vim config is in a bash startup file:
alias vim=/usr/bin/emacs
Re: (Score:2)
Blasphemy! :)
Of course you could just set EDITOR...
Re: (Score:2)
alias vim=/usr/bin/emacs
Have you realized yet someone did 'ln -s /usr/bin/gvim /usr/bin/emacs"?
Re: (Score:2)
In the vi vs emacs wars, there is only one real point to argue and that is the cat index. Get a cat on the keyboard and see how much damage it can do to the file.
Wayland support? (Score:2)
XDG dir (Score:2)
I just upgraded from 9.1 to 9.2 after reading this article. I hate apps that pollute my home with config files rather than putting them in ~/.config. I deleted my ~/.vim* and started vim and it immediately made a new ~/.viminfo, what gives?!
Not even that (Score:3)
I'm still using whatever version of vim came with my initial distro install since as far as basic text editing goes it's been feature complete for decades. I'm sure some people like writing vim scripts to do... drawing a blank frankly.... but only once in my 30 year career have I met someone who did and that was just to do some company specific search and replacing.
Re: (Score:2)