Multiline Editing in Neovim
Vložit
- čas přidán 11. 07. 2024
- In this video I walk through various ways to edit multiple lines of text in Neovim and vim.
Multiline plugin: github.com/mg979/vim-visual-m...
Companion Article: / multiline-editing-in-n...
Join this channel to get access to perks:
www.youtube.com/@ascourter/join
Twitter: / exosyphon
Website: andrewcourter.com
Twitch: / exosyphon
Gear:
Mic: amzn.to/40GUGFg
Mic Interface: amzn.to/3YGxaGE
Mic preamp: amzn.to/3XtBXtY
Webcam: amzn.to/3OEOZRU
Boom Arm: amzn.to/3qLr0GE
Vissles (VS II switches): vissles.com/?ref=69zn8aei20 - Coupon Code for $5 off: ANDREWCOURTER
IQUNIX F97 (TTC ACE switches): iqunix.store/collections/f97-...
0:00 Intro
0:25 Macros
1:17 Regex Replace
1:38 Vim Visual Multi
4:19 Outro
#neovim #coding #programming - Věda a technologie
Do you have other ways of editing multiple lines in Neovim or Vim? Share in the comments!
Base Vim Visual Multi functionality can be done with built-in features. Just Ctrl+v and select your block, then Shift+i and edit whatever you like and then switch to normal mode again and it gets applied.
@@Linuxdirk Yes! Thank you for sharing this. This is also a good way to do multiline editing.
@@ascourter Yep :) By far not as advanced as the plugin, but still …
@@Linuxdirk I was going to mention ctrl+v lol
Please keep doing this, I loved and learned a lot from this video.
Cool stuff Andrew!
Thanks Danny!
That ^n trick is something I was sad to lose moving to nvim. I used it all the time in atom, sublime, vs code, and even intellij. I've been wondering if there was a plugin... then I found your channel. Thanks! My nvim got even better today.
Love it!
Ctrl+v gang checking in.
This is on my list to do a second multiline editing video on!
Awesome explanations! 👏
Thank you!
Liked + Subscribed. Consice and to the point, keep going Andrew.
Thank you!!
Amazing, thank you
I just don't understand how you have so little subscribers with such great content. Perhaps it's just me, but it feels like there are enough beginner tutorials and these more advanced tutorials are harder to find.
Thanks! Yeah I have done some beginner stuff but want to share more on advanced usage where possible. Thanks for watching!
Thx for the video, you're awesome 🎉
Thank you!
nice tutorial
Thank you!
Which font are you using for terminal? Looks very nice
Thanks! I'm using FiraCode Nerd Font. Here's a link to my kitty conf file:
github.com/exosyphon/dotfiles/blob/main/kitty.conf
Gruvbox
How do you have one unique colored letter in each word per line? I need this! Please keep up the great content. Thanks.
Thanks! Check out this plugin:
github.com/jinh0/eyeliner.nvim
@ascourter I' m already using and loving it! Thanks!
Very cool. Takes some getting used to, but very cool. Needed to change some remaps, because Alt+j/k does not work for MacOS.
Just out of interest. What Plugin does the highlight of the different letters in your current line? (I know, the highlighted letters are for use with the f key in normal mode, but I don't know what plugin does that)
Thanks! That plugin is called eyeliner. Thanks for watching!
@@ascourter Thanks
A shame this needs a plugin. This should be included by default. Thanks for sharing.
Holy useStates batman.
Which programming language is this?
This is a NextJS app so it uses Typescript as the language and then has React components. In the bottom right you can see the filetype as "typescriptreact".
🧠
The ctrl+n dont work for me.
Double check your keymaps with Telescope keymaps
I am dumb but not so dumb as to install plugins for vim or neovim. I will just use visual block mode with Shift + i
lol
"Promosm"
can you create multiple line cursors that are not aligned? Say I want to add something to three element classes but they're not vertically aligned. Can this plugin do it? Or are you limited to create new cursors going up and down?
They do not need to be aligned. If you hit C-n after highlighting the word then it will match the next one.
@@ascourter but what if i want arbitrary values? I believe vscode has a functionality where you can ctrl+click in arbitrary places to spawn multiple cursors
@@allsunday1485 I don't think that would be supported but you could double check the documentation on if you could Ctrl and click. Using the mouse would be the only way I could think of allowing arbitrary cursors but Neovim leans heavily into only keyboard shortcuts.
@@ascourter i most definitely don't want to use the mouse. I was thinking a key stroke to begin cursor marking mode, then another one for adding extra cursor at current position and finally leave cursor marking mode and edit however you see fit. That's what I had in mind
@@allsunday1485 they have click to create a cursor functionality disabled by default. add the equivalent to your vim rc
let g:VM_mouse_mappings = 1
\\\ will start cursor mode in place, then ctrl click wherever
edit : doesn't work for me, possibly some conflict with another plugin. just goes into visual block mode
I love regex