LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-14-2008, 08:51 AM   #1
brianmcgee
Member
 
Registered: Jun 2007
Location: Munich, Germany
Distribution: RHEL, CentOS, Fedora, SLES (...)
Posts: 399

Rep: Reputation: 40
Vim: How to hide commentary lines


I know that one can use the following to remove comment lines that start with "#" each line via:

Code:
cat somefile | grep -v \# | vi
But is it possible to hide commentary lines in vi/vim? I know that there are additional macros e.g. for folding that may introduce such features.

Alas, I didn't find any cues to such a functionality...
 
Old 04-14-2008, 09:15 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Is this what you are looking for: fold.vim

Hope this helps.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
VIM: How to delete all lines that include special words. cryincold Linux - Software 3 02-09-2008 11:17 PM
comment multiple lines in vim Furlinastis Slackware 9 12-11-2007 01:01 PM
VIM finding and commenting lines shamgar03 Linux - Software 3 06-06-2006 04:49 PM
vim: mark end-of-line? trim blank lines? prell Linux - Software 3 09-20-2004 11:04 PM
Commentary; Terroristic Crackers jdh77 Linux - Security 2 12-06-2003 02:37 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration