Skip to content

huyz/less.vim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

less.vim

This is a better command-line pager than less: just as fast and easy to use as less but as colorful as vim. You don't need to learn how to use vi/vim; the keybindings are almost the same as less. Just use this whenever you'd normally use less.

Why is this built on top of vim? To browse through files with full colored syntax highlighting (even from standard input, if possible) and have access to vim functionality if you need it. Why not just use vim? less-like keymappings are much quicker and easier for navigation: you only use single keystrokes; no control keys. Quitting is just 'q', believe it or not.

This repository consists of two files which provide improved versions of less.{vim,sh}, originally conceived and written by Bram Moolenaar and distributed with vim.

  • m : lets you page through files or standard input as with less (but with vim instead). It sets some improved options such as smart-case search and unsets confusing options potentially set by user in their ~/.vimrc such as the statusbar. It also acts as less -F and quits out immediately if a single file has less than a screenful. (There's no need to page if there's less than one page.) This file is an improved version of less.sh that is distributed with vim.
  • less.vim : companion script to m. It's an improved version of the less.vim script distributed with vim, with some bug fixes and better quitting behavior. See contents of files for details of modifications.

Screenshots

Paging less.vim with less.vim:

less.vim screenshot

Comments

You can submit feedback on GitHub or my blog entry.

MIT License for 'm'

Copyright (C) 2011 Huy Z http://huyz.us/

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Releases

No releases published

Packages

No packages published