Vim Tips Wiki


< User:Ewfalor

Revision as of 19:09, June 3, 2008 by Ewfalor (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
1,614pages on
this wiki

Vim ships with a program called, which makes the UN*X less command use a customized Vim set up to page through your files.

This batch file does the same thing, but for Windows users. This beats the default 'more' command, as it supports scrolling up as well as down, searching, and highlights the syntax if Vim recognizes the filetype.

Put this code into a file called 'less.bat', and add the directory containing less.bat to your %PATH%: Control Panel->System->Advanced->Environment Variables

@echo off
rem Batch file to start Vim with less.vim.
rem Read stdin if no arguments were given.
rem Based upon from the Vim distribution.
rem Version: 1.0
rem Author:  Erik Falor <>

IF !%1==! (vim --cmd "let no_plugin_maps = 1" -c "runtime! macros/less.vim" -) ELSE (vim --cmd "let no_plugin_maps = 1" -c "runtime! macros/less.vim" %*)

Around Wikia's network

Random Wiki