LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 12-22-2006, 02:09 PM   #1
sadarax
Member
 
Registered: Sep 2005
Distribution: Ubuntu
Posts: 252

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:
Code:
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"
  else
    let s:fold_comments = 0
    set foldlevel=9
    echo "Unfolding comments"
  endif
  set foldmethod=manual
endfunction

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


Reply

Tags
code, multiple, options, vim, vimrc



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

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