Too Cool for Internet Explorer


Swobodin's Profile | Swobodin's Blog | Back to Fedora Tunisia

Vim Macros

Here are some interesting Vim macros you can put on your ~/.vimrc :
To make get an insensitive and “smart” search:
set ignorecase
set smartcase

C file template will be generated when you press F7 button:
map <F7> i#include <stdio.h><CR>int main(int argc, char *argv[])<CR>{<CR><CR>return 0;<CR>}<ESC>
Perl heder, when you press F8:
map <F8> i#!/usr/bin/perl -w<CR><Left><Del>use strict;<CR>use warnings;<CR>use POSIX<ESC;>
Python header, press F9:
map <F9> i#!/usr/bin/python<ESC>o## -*- coding: iso-8859-1 -*-<CR><ESC>
To activate folding:
set foldmethod=on
To fold on a file, limit your text by
{{{ Some Title
And
}}}
To open a folded text, press “space” at the beginning of folding , to unexpand all folds, type
Escape - z - m

Related posts

(sometimes, the plugin foolishes)
Simple Perl loop script
Perl Poetry
GraphInside
Search’n'Replace
Perl uniq array, to remove duplications

Technorati tags

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

 
 

This is a captcha-picture. It is used to prevent mass-access by robots. (see: www.captcha.net)

You must read and type the 5 chars within 0..9 and A..F, and submit the form.

  

Oh no, I cannot read this. Please, generate a


Top Tunisie Blogs