Quantcast
Channel: Daily Vim: Text Editor Tips, Tricks, Tutorials, and HOWTOs
Browsing all 25 articles
Browse latest View live

Shift-Tab'ing

I have the following in my vimrc:set sts=4set etThis allows me to take advantage of the convenience of the tab key when editing while actually inserting spaces into the current buffer. Intuitively I've...

View Article



Indent From Insert

In the comments of my last post, graywh left a great tip that I didn't know about. If you're working in insert mode, you can change the indent level of the current line using <C-t> and...

View Article

Jumping to a Buffer

If you have split windows open with multiple buffers, you can jump directly to a specific buffer number by doing the following:N<C-w><C-w>N is the window number you want to move the cursor...

View Article

Text States

If you're using Vim 7+, you can use g- and g+ to go between text states. For a more advanced usage see the :help earlier and :help later.

View Article

Starting on a Specific Line

An anonymous reader writes:You can open a file on the command line and automatically put the cursor on the last line by typing:vim + fileIf you want vim to start at a specific line you can do the...

View Article


Indent From Normal Mode

From normal mode, pressing == will indent the current line.

View Article

More on Text States

A few people have asked me for more information on text states. An anonymous reader contributed the following in the comments of my previous post on the topic.Using g+ and g- is very different than...

View Article

Vimgrep Tips

I've mentioned vimgrep in a previous post, but I neglected to mention a few useful flags that can be used in conjunction with it.If you apply the 'g' flag to your vimgrep, it will return all matches...

View Article


Back From The Dead

After an almost four year hiatus, I've decided to bring this blog back from the dead. Looking over the last decade, my career as a programmer has been an interesting and challenging endeavor, and over...

View Article


The Wonderful "F" Key

If you press the "f" key in normal mode, Vim will move the cursor forward to whatever character you input after "f" is pressed. As an example, consider the following line: a quick brown fox If the...

View Article

Pathogen Makes Plugin Management Easy

I have been using Pathogen for installing new plugins whenever possible for quite a while now. In my opinion, Pathogen is the simplest path to extending your existing Vim runtime with additional...

View Article

Sort: Human Numeric

The sort command can accept input data formatted in human readable form. The du -h command is a longtime favorite for finding file sizes in a format that's easy to read with the naked eye. Coupled with...

View Article

Sensible Defaults with Vim-Sensible

If you have a fresh Vim install, and you'd like a sensible set of defaults, consider installing the vim-sensible plugin. If you've already installed Pathogen, installing the plugin can be accomplished...

View Article


Cheap Process Monitoring: Echo, Watch, and Netcat

I frequently work with memcached, gearman, and a variety of other services that allow you to retrieve useful stats by connecting via telnet and issuing a status command. In a lot of cases, retrieving...

View Article

Wrap Git With Fugitive

From the Fugitive Github page: I'm not going to lie to you; fugitive.vim may very well be the best Git wrapper of all time. Check out these features: View any blob, tree, commit, or tag in the...

View Article


Watching Memcached Traffic with TCPDump

Here's a fun little one-liner I just hacked together to keep tabs on the get/set commands coming in on a memcached server that I administer. sudo tcpdump -i eth0 -s 65535 -A -ttt port 11211| cut -c 9-...

View Article

Basic Recovery

The following commands are useful for recovering an editing session. Retrieve a list of recoverable files. vim -r Recover a specific file. vim -r .file.extension.swp (from swap files listed above)...

View Article


Image may be NSFW.
Clik here to view.

Vim Gitgutter

Vim Gitgutter Vim Gitgutter shows a diff in the sign (left-hand) column of your editing window. This is a really cool way to see what portions of a file have changed without resorting to git diff....

View Article

Supertab

If you like Bash auto-completion, you'll love Supertab. Installation and configuration details are available via its Github Page.

View Article

Snipmate

If you like Textmate Snippits, consider installing Snipmate. From the Github page. SnipMate aims to provide support for textual snippets, similar to TextMate or other Vim plugins like UltiSnips. For...

View Article
Browsing all 25 articles
Browse latest View live


Latest Images