If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Editing a webpage from a command line editor

Learn how to edit your Khan Academy webpages in a command line editor like Vim.

Want to join the conversation?

No posts yet.

Video transcript

- [Voiceover] Alright, so I've got my webpage about rabbits and I would like to edit that in my command line editor. So to do that, I need to go over to my command line, which is the Terminal app on the Mac, and then I'm going to pick one of the command line editors. I'm going to use vim. Type the command for that editor, and now I'm going to make up a filename, say allaboutrabbits.html, press enter, and now I am actually inside the editor. Doesn't look like much but there's actually a lot of functionality here. So, I'm going to paste it in using some vim commands, and now you can see my html is inside vim and I can navigate everything using the keyboard, the arrow keys, and different other commands that I'm familiar with. And, if I'd like, I can make a little edit here, so, what did we do before? Let's make this about bunny rabbits, okay, and then I'm going to save using the wq command. Alright, so I saved and I left it, now I'm going to open it, using the open command. And that should go ahead and open in the browser, there we go. I can see my change and it's working great, and if I want to I can go open it back up and make some changes, and then reload the page when I'm done. So let's see, All about bunny rabbits, add even more exclamation marks! Save it, go back into my browser, open it, ta-da. So there you have it, this is the command line workflow. And, it's going to be different depending on exactly which command line editor you use, but generally it's a lot of using different commands, getting really comfortable with that editor, and coming up with a nice flow for editing and reloading in the browser.