Create beautiful code screenshots in Neovim. Without damaging your wrists.
Вставка
- Опубліковано 25 сер 2024
- No wrists were harmed in the making of this video.
Sharing code is one of the best things about writing it, however, screenshots usually suck. Fortunately for us, there are a number of tools out there to create aesthetic pictures of our code, unfortunately for our wrists, however, they're all rather mouse heavy.
That's where these three neovim plugins come in, which can help us turn this mouse heavy experience, into a much more neovim friendly one.
Video Links:
DreamNvim: github.com/dre...
carbon-now.nvim: github.com/ell...
codesnap.nvim: github.com/mis...
nvim-silicon: github.com/mic...
wallpaper: www.freepik.co...
Become a better developer in 4 minutes: bit.ly/45C7a29 👈
Join this channel to get access to perks:
/ @dreamsofcode
Join Discord: / discord
Join Twitter: / dreamsofcode_io
This is the coders equivalent of sitting in front of a mirror for an hour doing makeup 😂
The benefit in our case is we only have to do it once. Afterwards we can reuse the process!
🤣🤣🤣
no wrist was injured during making of this video
~Uhhhmm, Ackshhuuallly!~ Editing is mostly click ops so wrists were severely injured in the making of this video!
@zehph until someone builds a plugin to edit videos in neovim
@@zehph ~Uhhhmm, Ackshhuuallly!~ it's the switching between mouse and keyboard repetatively that injures the wrists, not the mouse it's self. so if editing is mostly clicks with little reason to use the keyboard your wrists are perfectly safe. people prefer only keyboard compared to only mouse because it's faster
@@kendlemintjed7571 ~Uhhhmm, Ackshhuuallly!~ It depends on the mouse. Standard mice position has a lot of ulnar deviation during pronation which is more conducive to RSI, a keyboard centric workflow is less strenuous, especially if you have a good height adjustment with elbow support. Split keyboard with tenting is golden, but even a setup focused on a standard keyboard and a decent chair is miles better than using a mouse for most things.
I've been running my channel for over 2 years now and I had no idea about silicon, carbon, or any of the plugins that integrate them with editors. thank you thank you for this video!!! always thought there was a good chance you were using some custom home grown tooling
I definitely have some custom home grown tooling as well haha. I need to tidy it up and then share it out.
I recently just finished my own ffmpeg recording server so I can record without OBS and just use a hotkey to trigger it. There's a couple of usability features to add before making it open source but it's improved my workflow a lot!
Oh! CodeSnap actually looks really interesting. Somehow that completely flew under my radar.. I'll have to try that one for sure!
Also.. what a lovely colour scheme you're using for your videos. I feel like I've seen that somewhere before.. 🤔
Anyhow; always a pleasure to see you upload. 💜
omg the goat is here 😳😳i love the themes ❤❤
goatppuccin
Smelly nerds is people!
why is there no exe???!??
@@PossseidonI DONT WANT THE SOURCE CODE, GIVE ME THE FUCKING EXE
@@hashtags_YT SMELLY SMELLY NERDS
@@hashtags_YT in gh, they dont even give the libfiles, so i have to find them through hours of searching "libraylib.a"
For Emacs users, I really like Tecosaur’s screenshot package. It does not rely on any external service, only on Emacs’ native screenshot capabilities. Because yes, Emacs can take screenshots of itself as png or svg files, but Tecosaur’s package makes them look a bit nicer.
Works well in Linux but I haven't got it to run on macOs yet
Another day, another nvim plugin added to my config.
That's a really nice topic, thanks for the video!
Glad you liked it!
This video could not have come sooner! I'm still on old Vim because I don't have a satisfactory Neovim setup yet. Like you, I'm a termit except on MacOS. I'm also rather old school and use C++ with some occasional shell programming.
Why do I feel called out 😭
Setting the plugin spec with `lazy = "true"` as a string, nice.
Great Tutorial,
Thank you
This makes me want to build a plugin that uses charmbracelet/freeze now!
I want more videos like this about neovim/nvchad because you are the only one 🙂
Thanks for the inspiration! Now, I’m going to wire this up in my emacs config. 👍😁
Have a look at Tecosaur’s screenshot package, it produces pretty much the same result without the need of an external service : )
Great video! I had no idea about these plugins so I used to screenshot my code instead 😭
Phenomenal coverage!!!
Could you create a tutorial on how you set up your Arch system, specifically the theme? It would be greatly appreciated since your terminal looks very clean.
Which keyboard and mouse you are using? They are really cool.
NOOOOOO a typo at 5:30 😭
Happy to see another GNOME user!
If you look at 7:09 you can see an option to directly copy the image output to the clipboard, which was what wanted in the beginning =)
would love to know how you make your videos, they are always dope❤
Thank you! I'll probably do a dedicated video on it one day! I have a lot of custom workflow that I built to speed things up my end.
Whoah, thanks for sharing!
i literally have carpal tunnel syndrome
which archlinux edition u use ? i like the theme awesome
Are you on Arch? If you are, what is your desktop enviroment and what shell theme is that?
Love your vids, thanks!
Glad you like them!
Also what DE are you using on Arch btw? ;-) Currently on pop, waiting for the cosmic alpha to drop. Thinking however of moving to arch for a number of reasons as long as the DE supports some level tiling. I am of course aware of i3 that provides the ultimate mouse free ergonomics of course, but despite the extreme risk of carpal tunnel syndrome on my poor wrists I still do sometimes prefer to use the mouse for certain tasks.
Feeling lucky that my wrists are not so fragile
I would love a video about latex with neovim
what liux distro do you use?
Very nice
How do you do the *_sharing_* part without a mouse?
Thanks, that was nice! I thought I had reached Neovim plugin stability, but this one definitely goes into the toolbox now. Sadly the catpuccin-mocha theme is not yet supported by nvim-silicon and I am too lazy to contribute that... But Dracula is fine for me.
Btw. I am also on Arch (EndeavourOS) and I noticed that emojis are not shown in the screenshot, it is not a huge problem since I usually don't have any in my code. I am using nvim-silicon with the font setting `font = "IosevkaTerm NF=34;Noto Color Emoji=34"` and I have Noto Color Emoji installed. Do you have an idea?
What keyboard do you use? It looks great!
lazy=true is implied if you set cmd, event, or key, or any other lazy triggers
8:04 You should do instead of :, which makes the command prompt not show up for a split second
can you make a video on how to set NvChad i tried but the website only shows how to set up starter but not the main with other feature
What de/wm are you using in this video?
All good but why is it mimicking macOS window style?
@DreamsofCode For the attentive people.... I see a sofle v2 at 3:17 maybe? Definitely a split keyboard. If it is what I think it is did you got from Mechboards, I'm assuming you are from the UK too from the accent? I also notice some small level of tenting there. What case/tent thing are you using? Did you solder it all yourself. I'm currently going through a rabbit hole of the variations of split keyboards and what is the ultimate solution for my needs (aka play dota2 and code sometimes).
Looks like the voyager keyboard
As the other comment mentioned, it's the zsa voyager keyboard (:
How do you edit these beautiful videos without use your mouse?
can you include a link to your wallpaper in your description? looks sick
What font you use for code ??
JetBrainsMono Nerd Font.
I keep trying to find another and keep failing to do so!
The window_title option dosen't seem to pick the name of the buffer for screenshot file name. Have you found any workaround?
I use this function in my config:
window_title = function()
return vim.fn.fnamemodify(vim.api.nvim_buf_get_name(vim.api.nvim_get_current_buf()), ":t")
end,
The next thing I write, story, code or otherwise, I am using the word ‘termit’ unironically. 😂
I like new words, okay?
Hey, whch terminal do you use??
Mahn, please do the dadbod plugins for NvChad
Love this, fellow non-smelly but very much so...nerd 🤓
How do you make your font bold by highlighting text in visual mode? Thanks!
At the moment, my lazyvim plugin manager is broken whenever I try it to configure in neovim. Tried a few time from scratch and it seems the latest version is not working so well on my environment. I'm getting a lot of usr/share errors from any plugin a try to install. Is anyone with this issue?
Can you please release a video showing how to configure a nvChad after changing the configuration structure?
I have some videos planned!
I'll probably be moving away from NVChad though, the whole breaking change has left me salty 😭
for silicon, is there a way to bypass saving the screenshot, and just directly copy it to your clipboard?
Yes, now it is. There is an experimenal branch called wslclipimg, if you try that one, please. It allows you to omit the output config param and just use to_clipboard = true. It will then only copy to the clipboard. Also works with WSL. Read the updated README from that branch.
how do you do the code videos?
These snapshots do look very pretty, but i feel like most times i would rather just send text rather than an image. That would be generally more useful for the person you are sending to and most messageing platforms support markdown text highlighting. Perhaps i am missing something though
I generally agree! Sending text is better when the medium supports code blocks. On places such as X/Twitter it's not an option unfortunately! Sending a screenshot is generally easier on those platforms.
Oh, that's your level) Screenshotting of the code xD lololololololololololo
please make a video on image.nvim.
You gonna do a review on that ZSA Voyager you got there, speaking of wrist health? I have one and love it, but have adopted a 36 key chocofi, and controller works mini36. But I'd definitely recommend the Voyager to anyone looking for ergo split keyboards.
Absolutely! The voyager has been a complete life saver for my left thumb.
I may check out the chocofi! Split keybs are quickly becoming a weakness 😅
Fellow chocofi user as well saying hi 👋
Can I use CarbonNow with a remote server to which I am connected via SSH?
I might just try to make a kakoune plugin for silicon, yay to cli and server based extensions instead of having it run in nvim itself.
i'll go with silicon
6:50 what is that black connector cable?
It's a custom made TRRS cable that I got from etsy.
I highly recommend them, the seller is CustomCableCo
The issue with carbon and others is that the sweet tree-sitter syntax highlighting is gone 😭
I agree! I actually think Silicon could fix this using the treesitter highlight crate. I recently built something using it and was impressed!
I wrote silicon.nvim a while back and I am actually working on adding support for tree-sitter and themes already installed on neovim runtimepath.
I really like your Gnome DE, what settings are you using?
I use the Catppuccin gtk theme! I'll do a video about it on my other channel soon.
Can you please make a video on how to migrate the configs you've shown so far to Neovim release 2.5?
I'll be redoing the entire series in the near future!
@@dreamsofcode Weird thing but I found myself being able to redo the entire config + more. So I guess this is an invitation for everyone to try! The new config structure is somewhat easier also
What terminal are ya using? Looks beautiful!
I use Alacritty! I'll do a terminal setup video soon on my other channel!
@@dreamsofcodeWhats the name of the other channel?
@@lucasvieira6783 Dreams of Autonomy
It should be on my channel page!
How do you open the image file with `open `, is that an alias?
It is! It's an alias for xdg-open
@@dreamsofcode Thanks!
Hello there, actually I was trying to configure Nvim using Nv Chad for my project usecase but actually the commands and all I found on the website were totally altered hence I didn't get what I was looking for. Henceforth, I want to request you to please look into this matter and help me with a video for C++ with Neovim setup guide please.
If you check my NVChad videos there's a way to use the existing config in the comments and descriptions! They made some breaking changes unfortunately, but there is a way to use the older version.
I'll be redoing the entire series soon as well.
Do you edit videos without a mouse though?
OKAY YOU GOT ME
:)
Can you do a longer neovim setup video for web development, pleeeeeeease
What would you do with that picture without a mouse?
make videos about setup nvim for sveltekit please
How does he get the bottom bar on the terminal?
Tmux
Tmux as the other commenter said!
I have a video about it on my channel!
Can't press tab, skill issue I guess.
which file manager are you using :O
Nautilus! Aka Gnome Files.
I use the catppuccin theme!
@@dreamsofcode ty, looks really nice.
I'm also a big fan of Catppuccin, specially Mocha flavor.
I was using Nemo and PCManFM but they don't look as good.
I'll try it
what os are you using?
Arch, btw!
I use the gnome desktop environment for filming :)
Try and make a video on on gev nvim please 😅😅
Great video, can you share the background wallpaper?
Added to the video description!
wallpaper link please
www.freepik.com/free-ai-image/mythical-dragon-beast-anime-style_133761456.htm
Here you go!
@@dreamsofcode thanks
How copy a paste code? Make link for copy code.
Any tips for wrist pain? I already have a split keyboard.
How much do you use the mouse still?
Also a wrist rest can help, or using the arm supports on your chair
Hello fellow termits
where did you get that desktop wallpaper?
Freepik! I'll add a link to the video description
Why not use the `keys` argument lazy provides rather than calling which-key directly? Not a problem, I’m just curious.
It's a good question!
The main reason is to apply key binding descriptions via which key, which I don't believe the keys argument in lazy provides (I could be wrong though). I'd much rather the keys argument otherwise.
The drawback of my approach is the config does become a little more bloated.
@@dreamsofcode keys accepts a desc item in the tables. The reason I started using keys for all plugins is because I prefer mini.clue in lieu of which-key and it provides no key map function. And actually it is probably better not to since it is just duplicate functionality. Using lazy’s keys argument has the benefit of loading the plugin when the mapping is used too.
Hell yes
Screenshots are an inherently bad way to share code. Instead, we should encourage code blocks. More websites should support code blocks, and more people should know how to use them on websites that support them. This allows copying the code you are trying to share, with the added bonus of helping blind programmers read the code.
I think thats a great product idea to achieve both in one.
Generating a screenshot for sites that aren't code block friendly, whilst still remaining friendly for those that are. Perhaps also generating alt text for those that have vision impairments.
And this guy also specifically makes videos, which aren't conducive to code blocks. For this kind of content, photos can be a good fit since you have finer control over how they look and nobody would be ABLE to interact with them as text anyway. For videos repo + photos seems like the best combo to me
I have never hurt my wrist while taking screen shot 🙂
what OS you are using and themes?
arch and catppuccin
Arch btw
And what font?
Termit sounds lame, I propose termcel instead.
the real answer is ctrl+c
And why don't you simply take a screen shot? Most linux distros assign the screen shot to the key "prt sc". No need to to complicate things.
I believed covered the drawbacks in the first 30s
- Alignment
- Artifacts
- Using the mouse
@@dreamsofcode Yep, you are right, you did. I don't share code shots much so I did not realize it was a problem. My problems are more about using NvChad. I feel like I'm constantly fighting with it wishing for the days of good ol vi. Even vim was often too much for me. NvChad is way over the top. So much so that I often think of starting a channel called "idiots guide to nvchad". Everytime I try to do something "simple" I have to google for 10 minutes.
I hate screenshots of code! Code is CODE not pixels! A screenshot doesn’t zoom nicely and more importantly you cannot copy and paste the code, or search in it. Not to mention that a screenshot takes up thousands of times the memory of the code snippet itself. Bottom line, it just sucks.
Ban code screenshots!
I'm not sure that I'd go so far as to ban them, but I agree that they're not particularly useful on their own. For some services (Twitter as an example) it may be the only reasonable way to show code - hence the desire to have nice-looking code screenshots. If the image were to link to a gist or similar text-based version, that would be the best of both worlds - but most folks who're posting screenshots of code unfortunately don't do that.
first
I appreciate the video, but programmers surely are masters of over-engineering the hell out of trivial problems.
Everyone and their mom is a programmer and you really aren't solving much. Everything was solved 50 years ago.
Screenshoting your code is evil, please don't do this, just use copy paste
Why are people so stupid?
Being able to share code with other people is one reason why developers are worth minimum wage.
If you write code using a mouse you’re not a developer, unless you have a disability of some kind
which distro do you use?
I use arch! Btw.
Although, I've started playing with a NixOS installation, so I may make a change...
@@dreamsofcode and which Desktop environment? I really like your setup