background preloader

Why, oh WHY, do those #?@! nutheads use vi?

Why, oh WHY, do those #?@! nutheads use vi?
The VI Gang Sign by Jon Beltran de Heredia, May 16th, 2007 Yes, even if you can't believe it, there are a lot fans of the 30-years-old vi editor (or its more recent, just-15-years-old, best clone & great improvement, vim). No, they are not dinosaurs who don't want to catch up with the times - the community of vi users just keeps growing: myself, I only got started 2 years ago (after over 10 years of being a professional programmer). Friends of mine are converting today. Heck, most vi users were not even born when vi was written! Yes, there are definite reasons why the vi/vim editing model is just superior to any other out there. Misconception #1: modal editing The first time you stumble into vi or vim, you are shocked and disgusted that you have to use 'i' to start typing text. Turns out, this is just a completely wrong way to use vi or vim. Let me explain the philosophy behind this. And now we come to insert commands. Example #1: the wonderful dot command Let's see a concrete example.

Related:  VimPython & VIM ResourcesVIM

Learn Vim Progressively tl;dr: You want to teach yourself vim (the best text editor known to human kind) in the fastest way possible. This is my way of doing it. You start by learning the minimal to survive, then you integrate all the tricks slowly. Vim the Six Billion Dollar editor Better, Stronger, Faster. The Vim Learning Curve is a Myth I’ve been speaking about and teaching people vim for several years now, and I’ve noticed a surprising pattern: people are literally afraid of learning the editor. Over the years, the popular mythology around vim has become that it’s insanely difficult to learn; a task to be attempted by only those with the thickest of neck-beards. I’ve heard dozens of times from folks who are convinced it will take them months to reach proficiency. These beliefs are false.

Copy, cut and paste Here is how to cut-and-paste or copy-and-paste text using a visual selection in Vim. See Cut/copy and paste using visual selection for the main article. Cut and paste: Graphical vi-vim Cheat Sheet and Tutorial Learning vi or vim is not easy. But it doesn't have to be that difficult, either. It is, in any case, faster, more powerful, and more productive than editing with any other editor, so you would do very well in investing the time and effort to learn it. Being a vi lover myself, I came up with the idea of providing a graphical cheat sheet for those learning vi or vim, and I also found out it was a very good way to structure a tutorial.

Learning Vim in a Week February 8, 2014 · Development Tips vim Note: I turned this blog post into a talk for Boston Vim, check it out here: Learning Vim in a Week - Boston Vim. I'd been using Sublime for a long time and recently switched over to Vim. Style Guide for Python Code Code should be written in a way that does not disadvantage other implementations of Python (PyPy, Jython, IronPython, Cython, Psyco, and such). For example, do not rely on CPython's efficient implementation of in-place string concatenation for statements in the form a += b or a = a + b . This optimization is fragile even in CPython (it only works for some types) and isn't present at all in implementations that don't use refcounting.

Moving around You can save a lot of time when navigating through text by using appropriate movement commands. In most cases the cursor keys are not the best choice. Here are some basic movement commands that may help you acquire a taste for more: e Delete all lines containing a pattern The ex command g is very useful for acting on lines that match a pattern. You can use it with the d command, to delete all lines that contain a particular pattern, or all lines that do not contain a pattern. For example, to delete all lines containing "profile" (remove the /d to show the lines that the command will delete):

5 Essential VIM Plugins That Greatly Increase my Productivity There are a lot of VIM plugins to choose from. An individual’s list of what would be considered “essential” is largely a personal matter. For any given plugin, there is also probably going to be an excellent alternative plugin that does the same basic thing in a slightly different way. I’m just starting to use VIM for more than just quick edits of files on a server, and the plugins below are solving very specific workflow issues that I’ve encountered while learning to be productive in VIM. warning: watch out for plugins, generally.

Benefits of this Interactive Textbook — How to Think like a Computer Scientist: Interactive Edition Welcome! Take a tour, experiment with Python, join more than 850,000 other readers in learning how to think like a computer scientist with Python. (welcome) You can experiment with activecode examples right in the bookClick Show/Hide Code buttonOn line 7: change numTurtles = 10 to numTurtles = 6Click the Run buttonYou can do your homework right in the textbook.You can interact with other learners to discuss homeworkInteractive questions make sure that you are on track and help you focus.Codelens helps you develop a mental model of how Python works.Audio Tours help you understand the code.Short videos cover difficult or important topics.You can highlight text, and take notes in scratch editors This interactive book is a product of the Runestone Interactive Project at Luther College, led by Brad Miller and David Ranum. There have been many contributors to the project.

Tutorial To be rewarded by the power of Vim, you will need to learn to properly drive it. Following are some simple tutorial guides for getting started. Please ignore anyone who provides advice on how to configure Vim to operate like Notepad! Keep your vimrc file clean Many tips that you find on this site and others will tell you to add some code to your .vimrc file. (Or on Windows, your _vimrc file.) :help vimrc-intro Once you do this a few times, it can get pretty big and confusing, especially if the bits of configuration you are adding are each specific to a single language. Worse, some settings might be incompatible with others.

How To Use Vundle to Manage Vim Plugins on a Linux VPS Introduction The vim text editor is a versatile and extremely powerful tool for manipulating plain text, managing system configuration files, and creating code. While the modal editing design focus and the elegant grammar of the editor itself is loved by its users, its interface and functionality sometimes lacks the niceties that some users would like. Luckily, vim also includes a plugin, or script, system which can be used to extend the editor in various ways. These are implemented as simple configuration files that are stored in subdirectories under the ~.vim directory according to their function. As you add more plugins, these can get quite messy and it can be difficult to keep these plugins separate and to manage them effectively.