Making Neovim Look More Like Doom Emacs

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
the two text editors that i use the most are doomy max and neo vim doomy max is a gui program it's much more fully featured as far as a fully featured ide it's got a lot of plugins and a lot of sensible defaults that most people would enable anyway already baked into it and that's really why i love doomy max neovim on the other hand it's a terminal based text editor and it's very minimal out of the box unless you spend some time working on your neo-vim config file and you enable a bunch of plugins neovim really isn't like a fully featured ide in the sense that something like doom emacs is but you can turn it into that in the last couple of days i've been working on my neo-vim config to try to make neo-vim behave a little more like doomy max so let me switch over to my desktop here and let me launch doomy max do me max typically you're going to have some kind of start screen or dashboard with doomy max now this is not the doomy mac start screen that you would typically see i've got a custom dashboard that i created here for my doom emacs but you'll get a dashboard and one of the cool things about doomy max is they have the which key plugin enabled out of the box which most emacs users typically will install which key which key tells you what the next possible key bindings and their commands could be so if you start typing a key for example space on the keyboard is the leader key here in doomy max it will give me some hints of what the next possible key and the command that that would perform would be you know so space and then the next thing i could type for example would be the plus sign which adds a buffer to the current perspective or whatever the the key binding i was searching for that's a really nice functionality let me open up a terminal and let me launch neo vim now neo vim my neo vim that i've been working on now has a dashboard similar to doom emacs and just like doom emacs i have enabled the which key plugin that is available for neovim so if i type space which is also my leader key in neovim now i get these hints of what the next possible key in a key binding involving the space key could be so let me show you a little bit of how i did this so let me go ahead and open my neo-vim config and i've got these hints here in the dashboard as far as key bindings and you see one of the ones i have space fr for find recent files that is the exact same key binding that doom emacs uses so i chose that for this so if i do space fr it launches the telescope plug-in telescope is a plug-in that is made by our friend tj devries who i interviewed just a couple of weeks ago on the channel he is a neo-vim core team member and he also creates this very popular telescope plugin for neo-vim and now i could search for a recent file and one of the recent files i've been working on of course is my init.lua file for neovim and if i go to the bottom of this file so if i do shift g and vim of course goes to the bottom of the document i'll get to the plugin section now i've spent some time with this plugin section it's actually most of the file here starts with this comment plugins and then return require packer so i'm using the packer package manager plugin manager inside neo vim which is very similar to to something like use package inside emac so if you're used to how used package works with emacs you're kind of used to how packer works so the way packer works is you have this statement here use and then the name of the plugin and essentially that tells packer that you want to install that plugin you want to use that plugin but inside this use statement other than just the location of the plugin the name of the plugin you can actually add other information for example specific configuration stuff for the plugin so it basically tells packer hey if this file is not installed install it and if it is installed and you know here's some configuration options i want you to go ahead and set up so theming or keybinding information and things like that can go inside some of these use statements so let me show you some of the plugins that i've actually went ahead and added to my config here in the last couple of days the first thing i added was the dashboard which you saw dashboard they've got a lot of really fancy screenshots and there's a lot of configuration options for the dashboard mine was a very vanilla very plain and quite frankly i kind of like it being kind of plain i certainly wouldn't want to go crazy with the lol cat colors that some people in these screenshots are using but the dashboard i think is a nice touch that way you have a start screen for neo vim because by default when you launch neovim if you didn't have a dashboard you would just launch directly into an empty buffer right you just have an empty page there's no hints as far as key bindings if you forgot certain key bindings important key bindings for example like you know how to quit neovim right now because i have the dashboard i have all the important key bindings that i need right here on the dashboard laid out for me as well as you know i added some funny little tips i don't know if you guys can see this let me zoom in the tip i have up under the ascii art tip to exit neovim just power off your computer and of course then i got some funny stuff here at the bottom if i'm using neo vim then my emacs config must be broken right a little text editor humor there so i added the dashboard and again i added tj devri's his uh telescope plugin which is a fuzzy finder and this is a really cool little plugin as well i also added this plugin as well which is called telescope file browser and as you can imagine it's kind of like a file browser a file manager that uses the telescope plugin and then i also added the which key plugin as well and lastly i went ahead and added org mode as well inside neo-vim now i have actually tried out org mode nvm and neovim before because there's there's a few of these org mode plugins that appear on the scene every now and then and i will say that don't get your hopes up if you're a emacs user about using org mode and neovim because org mode in neovim all the plugins i've tried they typically do like 10 of what org mode and emacs does it's just because of the nature of it emacs has been developing org mode for probably 20 years now it's actually been it's no longer even a plug-in for emacs it's actually built into emacs it's actually been a native part of emacs now for i think at least at least 15 years so because of that org mode is always going to be a first class citizen in emacs and in vim and in neovim it's probably always going to be a little clunky but i do spend a lot of time writing and editing org documents and in case i wanted to do this inside neovim i went ahead and added the org mode plugin so let me get back to my neovim config here and let me go to the top of the document and really what i want to do is i want to go back to the dashboard if i do colon to get into command mode i could type dashboard and it would actually just take me right back to the dashboard and several of the key bindings i have on the front page here are actually telescope related key bindings so find recent files i think find files and of course file browser is the telescope file browser plugin let me show you how that works space fb now this is the file browser right the file manager that uses the telescope plugin right so it's basically the telescope fuzzy finder and it acts exactly like a file browser so i can use the arrow keys to navigate uh you can't really use j and k to go up and down because j and k of course are gonna you know do this right you're actually going to start doing a fuzzy finding using jnk and let's say i wanted to navigate to a file or a directory in my home directory which is where we're at so let me go ahead and search for well let's search for documents then i could hit enter i could get into documents here if i wanted to go back up a directory we're already on the dot dot alias which of course is the alias for the parent directory so if i just hit enter i will go back up a directory if i hit escape once to get into normal mode and escape again it will actually just escape out of the telescope file browser now i had space fr for recent files and this is a telescope command as well if i actually get back into the config file let me do a search for telescope and there it is and you can see my key bindings here that i've added leader fr is keybinded to run the command telescope space old files so that is the command that actually runs that so space fr is running telescope old files and you can see i've mapped in for normal mode space ff is telescope find underscore files so space ff is the telescope find files command and then again escape twice to get out of that and then i did a find word i mapped that to space fw and what that is is telescope live underscore grip that's the command so space fw for find word find a specific word doesn't look like it suggests anything here but if i started typing you know telescope for example it's going to i guess look in my dot files repository which is actually a get bear repository for my home directory one other cool thing is i added a space ht for telescope color scheme now space ht is a doomy max key binding i use to change the color scheme of doom emacs i also wanted that exact same key binding and functionality inside neo vim so space ht runs telescope color scheme meaning run the telescope fuzzy finder and list all of the available vim color schemes right so now i could switch to any color scheme so that is how that workspace ht again let me search for one dark to go back to the one dark color scheme and just below the keybinding section here of my init.lua i had this section here that i called dashboard so this is some settings for the dashboard this is the ascii art that you see when i launch neo-vim right and so that's the ascii art that gets printed and that is that tip line where it says just power off the computer to quit uh and then this is the uh the keybinding hints right so the description recent sessions and shortcuts space sl so if i open a new terminal and enter neovim here you can see recent sessions space sl now that just prints out the text to the dashboard it actually doesn't set a key binding for any of these right just because they appear here that does not mean that that's the actual key binding that's going to run a real command right you still have to go into your key bindings and actually make sure those key bindings exist so let me close that window and then really that's all i've played with here in the last couple of days is just getting those handful of plugins working just so now when i launch vim you know i can actually get a proper start screen if you will with the dashboard and i'm really happy that i now can do space fr because that's like i i'm so used to that keyboarding and do me max space fr for find recent files and then immediately have access to all the files that i've been working on lately and of course this telescope plug-in i'm really enjoying this as well now the which key plug-in which should give me uh keybinding hints honestly i don't find that terribly useful in the ovim because honestly you don't have as many key bindings to remember inside something like vim or neovim as you do in emacs which literally has thousands and thousands of key bindings and custom programs and stuff built into it that you couldn't possibly ever remember and that's why which key is so important as a emacs plug-in for neo-vim i could probably take it or leave it as far as the which key plug in do i really need it probably not but i'm going to leave it in my config for a little while to see if it grows on me for those of you wondering how org mode looks let me go ahead and do space fr for find recent files i'm undo.org just to find something that ends in.org that i've worked on here recently so readme.org this is for my dot files repository and you can see it is not a gui program right neovim has to run in a terminal so it really doesn't have any kind of fancy bullets obviously images don't render because this would be an image inside emacs this link to this thumb.ping file here and of course that's just a limitation of terminals terminals you know can't display images typically but other than that it does have syntax highlighting right as far as org documents all right you can see the headers are blue you can see all the org mode links are red you can see the regular text is white if i go down you can see the second level headers are this orangish color i should find something with source code blocks let me do space f4 for find recent files so let's get into the telescope plugin again and see if i can find my doom config.org have i worked on that i have not so instead of find recent files let's do the file browser space fb and by default the telescope file browser does not show hidden files because my doom config is going to be in the dot config directory but it doesn't show that here in my home directory by default but i believe if i do control h that will toggle on show hidden files and now when i search for dot config there is that directory and now let me search for doom and now we're in that directory and now config.org and i can hit enter and if i scroll down a little bit let me find some source code blocks yeah and they have syntax highlighting as far as the beginning and ending statements of the source code blocks but the code inside the blocks themselves it doesn't look like that has any kind of syntax highlighting it this is probably though the fault of me not having it like an emacs lisp syntax highlighting plug-in enabled for neo-vim because how many people honestly use neo-vim to write emacs lists probably not that many so i probably should search for a e-lisp plug-in for neo-vim and it would probably correct that and i'd probably get some pretty nice syntax highlighting for the source code blocks themselves the org mode tables they look great right here inside the org mode plugin for neovim so i'm pretty happy with that so overall i'm pretty happy with the plugins that i've been playing around with the last couple of days if you guys want to see my latest config file i've pushed it to my dot files repository on my git lab so you guys check that out if you want to see what i've been up to now before i go i need to thank a few special people i need to thank the producers of this episode and of course i'm talking about dustin gabe james matt maxim mimi michael mitchell paul west why you bald on me alex allen armor dragon chuck commander angry okay dylan greg marstrum eryan alexander paul peace arch and fedor polytech realities for less red prophet stephen toolsdevler and willie they're my highest tiered patrons over on patreon without these guys this episode you just watched would not have been possible the show's also brought to you by each and every one of these fine ladies and gentlemen all these names you're seeing on the screen these are all my supporters over on patreon because i don't have any corporate sponsors i'm sponsored by you guys the community if you like my work want to see more videos about linux and free and open source software like neovim subscribe to distrotube over on patreon all alright guys peace what are the odds i find a emacs list plugin for neovim
Info
Channel: DistroTube
Views: 32,319
Rating: undefined out of 5
Keywords: linux, gnu linux, vim, neovim, nvim, neovim setup, neovim tutorial, neovim from scratch, neovim vs vim, neovim config, neovim plugins, neovim lua, neovim vs vscode, vim vs emacs, doom emacs, beginner vim, neovim for beginners, vim for noobs, learn linux, learn vim, vim dashboard, vim orgmode, vim which key, neovim packer, neovim customisation, neovim telescope, neovim ide, text editor, windows text editor, mac text editor, linux text editor, distrotube
Id: 0dtc7Qnw6aY
Channel Id: undefined
Length: 15min 33sec (933 seconds)
Published: Fri Sep 16 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.