Posts tagged ‘vim’

Disable the “clear” issued when you exit vim

vim.png

When I am in vim (on Linux), and I :wq (or anything that will exit me from the vi session) it does a “clear screen”.

If you want this to stop, place the following in your ~/.vimrc

set t_ti= t_te=

User NERDtree to browse files from vim

vim.png

The NERD tree allows you to explore your filesystem and to open files and directories. It presents the filesystem to you in the form of a tree which you manipulate with the keyboard and/or mouse. It also allows you to perform simple filesystem operations.

Download NerdTree Here.

Install

Unzip the archive into your ~/.vim directory.
That should put NERD_tree.vim in ~/.vim/plugin and NERD_tree.txt in ~/.vim/doc.

How to have a lightweight, beautiful, functional terminal

terminal.png

I’ve done a lot over the past few months to make my time spent on the command line a bit more enjoyable and easier to use.  Hopefully you’ll find these steps useful as well.

Continue reading ‘How to have a lightweight, beautiful, functional terminal’ »

256 colors in vim

vim.png

XTerm and most other modern terminal emulaters support 256 colors.

To enable colors on XTerm you will need to run the configure scripts with the --enable-256-color switch, in addition you may also need to set your TERM environment variable to xterm-256color.

Continue reading ‘256 colors in vim’ »

Use tabs to open multiple files in vim

vim.png

Editing multiple files at once is made easier in the vim text editor with the use of tabs. Vincent Danen goes over the basic tab commands and shows you how to combine them with key bindings to make the most of a powerful editing tool.
Continue reading ‘Use tabs to open multiple files in vim’ »

Vim Tip: Changing color schemes

vim.png

Simple enough.  Make the directory /home/username/.vim/colors, save any color scheme files you find or write yourself to this directory.

To use a particular color scheme you can issue the command :colorscheme <name of color scheme> or place colorscheme <name of color scheme> in your ~/.vimrc file.

Here’s some color schemes to play with:

Desert, Wombat

If you wish to have different color schemes between vim and gvim, simply put this in your .vimrc file (changing the theme names of course)

if has(“gui_running”)
colorscheme inkpot
else
colorscheme metacosm
endif

Vimpress: Publish WordPress blog posts from Vim

vim.png

Vimpress is a very cool plugin for Vim. With Vimpress, you can publish and edit WordPress blog posts from Vim.
Continue reading ‘Vimpress: Publish WordPress blog posts from Vim’ »

How to use folds in vim

vim.png

The problem with writing and editing on a computer, versus having words on paper, is that it’s usually hard to compare text from different sections of a document when they don’t fit on the screen together. One way to do it is to use Vim’s viewports feature. Another is to “fold” the text. Using Vim’s folding features, you can tuck away portions of a file’s text so that they’re out of sight until you want to work with them again. Here’s how.
Vim’s folding commands begin with z — which, as the Vim docs point out, sort of looks like a folded piece of paper. OK, maybe not much, but at least the commands are consistent. If you want to do something with folding, it probably starts with z.
Continue reading ‘How to use folds in vim’ »

Post to Twitter or Identi.ca in Vim

twitter_logo.png

TwitVim is a Vim plugin that allows you to post to Twitter and view Twitter timelines. It is an enhancement of vimscript #2124 by Travis Jeffery.

Continue reading ‘Post to Twitter or Identi.ca in Vim’ »

Vim Tip: Point in Time Recovery

vim.png

Hopefully you know how to undo and redo in vim using u and Ctrl-R. But with newer versions of vim you get point in time recovery. with :earlier. Give it a shot, make some changes to a script and then try :earlier 1m. Very cool and an easy way to undo a bunch of changes.

Pages: 1 2 3 4 Next