a PSA since a lot of folks have been surprised to learn this: terminal programs often support the mouse! Try:
- opening `htop` and clicking a column header to sort
- opening `nano` (or vim, or micro) and clicking and dragging to select text
- using the scroll wheel in `mc`
it often Just Works
- opening `htop` and clicking a column header to sort
- opening `nano` (or vim, or micro) and clicking and dragging to select text
- using the scroll wheel in `mc`
it often Just Works
Comments
- tmux has mouse mode you can enable (`set mouse on`), which makes it super easy to switch, resize and add panes
- you can install `gpm` to have your mouse work for copy-paste in the virtual terminal (Ctrl+Alt+F1), too
... bsky could use at least the simplest `code` highlight =D
set mouse=a
In ~/.vimrc
This is a long way of saying "no, I can't actually quantify that, but it FEELS better" LOL
on htop it took me a while to discover by accident that you can reorder the columns
still really cool
Also when you can select text with a mouse then clicking is not a large leap
And mouse often replace input that a box with switches some terminals had..
my experience has been that my terminal let's me select the text but thats not Nano, so I cannot e.g cut my selection *in* Nano from there (by default)
By any chance would anyone know how to fucking copy a text in vim/neovim when using it over ssh? I tried bunch of stuff and nothing worked!
vim doesn't have that feature though (here's the open issue https://github.com/vim/vim/issues/14995)
Although I had to do some changes & configurations first. I updated neovim to the latest version (from github), and added the code snippet provided here: https://neovim.io/doc/user/provider.html#clipboard-osc52 , with some help from chatgpt, and it worked perfectly! Thank you for mentioning the github pull!
- tmux: resizing/focusing panes, the right click menu
- less: using the scroll wheel
- links: clicking on links, scrolling
- lazygit
- btop
(also selecting text in nano doesn't work, I was wrong about that)
- mouse support is off by default in tmux / vim
- in vim, mouse support can make it hard to copy text if your vim clipboard isn't synced with your system clipboard (like over SSH)
- click + drag in vim isn't that useful to me tbh but I like using the scroll wheel
I mostly installed nvim for use with the "VSCode Neovim" plugin.
Drags in vim can be useful if you have multiple windows open and want to resize.
This is so cool!!
Kitty terminal it works between the native tabs.
There is still a general feeling of "if I do the wrong thing I will erase the OS" among new terminal users, and it sticks.
And yes, RTFM does make you hardcore...
I've used it increasingly recently and am still baffled it works at all.
it's not so different from how the mouse works in a GUI in a way
If they gotta click a few headers to get there vs remembering some specific keybinds, so be it.
If they need to learn those keybinds later, they will
glancing at man/--help is so much context-switch overhead even if you're opening it in another pane.
set -g mouse on
in .tmux.conf
Except for copy+paste. I never learned how to do it without a mouse! Always end up doing something that feel non optimal like redirecting the text to a file then cat with backtics where I need it.
Wish I knew real Linux copy/paste.
I highlight with mouse, right click copy, then ctrl-v.
Seems like there should be a more terminal native way.
btw, I manage linux servers as my job now, and I learned a lot of it from your feed
glad you are on blue sky!
(cont.)
And there are SO many well-maintained and super-functional replacements for ls, cat, top, and even man out there.
If I were to recommend one: tldr - It's man without EVERY SINGLE THING that utility does.
`gpm -m /dev/input/mice -t imps2`
bash: https://github.com/tinmarino/mouse_xterm/blob/master/mouse.sh
I am assuming you are referring to commandline applications, and are not the terminal itself.
> and clicking and dragging to select text
Don't terminals let you do this, without a program needing to support it?
I can select text in XTerm without running anything on Linux. :/
I feel like bullet two could have been worded in a way to better illustrate this, as my comment serves to demonstrate. — The ability you pointed out. recognizing which text is selected, if any, is cool, though.
Thank you for your response and the clarification in it.
Don't get me wrong, I love the terminal to have mouse support!
No need for a window manager to use a mouse.
Nano, Vim, and Micro are text-editors.
“mc” is short for “Midnight Commander.” It’s a file-manager.
Except for vim, when visual mode comes up and I start hitting escape in a panic.
We need experts.
- Zellij
- Neovim (with LazyVim config)
- LazyDocker
- LazyGit
- Btop
I was surprised that all of the above have such great mouse support because they’re all very keyboard focused.
(You can turn it off with one option.)
So
:set mouse=
Is almost always the first command I type
can sometimes be desireable and sometimes not, so i eventually wanna learn how to turn it on/off
i sometimes have the impression clicks or ctrl-c/ctrl-v interact really with the program in the terminal like vim over ssh, and sometimes that key commands and mouse interact only with the gnome terminal app were i run bash + ssh + remote bash + vim
(vim and nano are ok i guess)
So I just use iTerm and forget the alien UI exists. It's chill.