Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 12-22-2006, 03:09 PM   #1
Registered: Sep 2005
Distribution: Ubuntu
Posts: 249

Rep: Reputation: 30
Vim foldmarker with multiple options (FIXED)

EDIT: I have fixed the problem I wanted to use 'foldmethod=syntax'

Behold my function to toggle code folding:

From my .vimrc:
nmap <silent> <F10> :call FoldComments() <CR>
let s:fold_comments = 0
function! FoldComments()
  set foldmethod=syntax
  if (s:fold_comments == 0)
    let s:fold_comments = 1
    set foldlevel=0
    echo "Folding comments"
    let s:fold_comments = 0
    set foldlevel=9
    echo "Unfolding comments"
  set foldmethod=manual

Last edited by sadarax; 01-23-2007 at 04:10 AM. Reason: Fixed


code, multiple, options, vim, vimrc

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Multiple booting options srivastava Linux - Software 2 05-19-2005 05:27 AM
vim: Piping through multiple external commands tragos Linux - Software 2 03-19-2005 02:09 PM
Can I have multiple desktop/manager options with single user? timsch75 Slackware 5 08-18-2004 06:10 PM
multiple files in VIM james.farrow Linux - Newbie 3 07-09-2004 06:46 AM
Why multiple linux options with grub? J.Q. Monkey Linux - Newbie 1 01-12-2004 04:08 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:19 AM.

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