Org-mode mailing list
 help / color / mirror / Atom feed
* Vim folding/syntax highlighting?
@ 2010-04-29 18:52 Nathan Neff
  2010-04-29 21:00 ` Bastien
  0 siblings, 1 reply; 5+ messages in thread
From: Nathan Neff @ 2010-04-29 18:52 UTC (permalink / raw)
  To: emacs-orgmode

Does anyone know of an org-mode syntax file and/or folding definition
for Vim?

I use Vim quite a bit, and would like to have *.org files highlighted nicely.

I'd also like to use Vim's folding capabilities to be able to fold the
headlines like org-mode does.

I'll probably write a syntax file and a folding method if nobody
knows of any existing ones.

Thanks,
--Nate

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Vim folding/syntax highlighting?
  2010-04-29 18:52 Vim folding/syntax highlighting? Nathan Neff
@ 2010-04-29 21:00 ` Bastien
  2010-05-18 13:03   ` Jean-Marie Gaillourdet
  0 siblings, 1 reply; 5+ messages in thread
From: Bastien @ 2010-04-29 21:00 UTC (permalink / raw)
  To: Nathan Neff; +Cc: emacs-orgmode

Nathan Neff <nathan.neff@gmail.com> writes:

> I'll probably write a syntax file and a folding method if nobody
> knows of any existing ones.

That would be really great!

-- 
 Bastien

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Vim folding/syntax highlighting?
  2010-04-29 21:00 ` Bastien
@ 2010-05-18 13:03   ` Jean-Marie Gaillourdet
  0 siblings, 0 replies; 5+ messages in thread
From: Jean-Marie Gaillourdet @ 2010-05-18 13:03 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1212 bytes --]

Hi,

sorry to answer so late, but I'm way behind my emails.

There is http://www.vim.org/scripts/script.php?script_id=1266 , which emulates folding like outline-mode. I'll attach my locally modified version of it. I've added support for deeper outline structures, drawers, tags, SCHEDULED and DEADLINE. This is just work in progress.

Just put file into ~/.vim/syntax and use :set ft=org or put the following line into ~/.vim/ftdetect/org.vim.

au BufRead,BufNewFile *.org		set filetype=org


Additionally, I have a file ~/vim/ftplugin/org.vim which contains:

map <Tab> za
autocmd! BufRead,BufNewFile *.org set filetype=org

This, allows to use tab to open and close folds as in org-mode.

Best regards,

Jean


On 29.04.2010, at 23:00, Bastien wrote:

> Nathan Neff <nathan.neff@gmail.com> writes:
> 
>> I'll probably write a syntax file and a folding method if nobody
>> knows of any existing ones.
> 
> That would be really great!
> 
> -- 
> Bastien
> 
> 
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

[-- Attachment #2: org.vim --]
[-- Type: application/octet-stream, Size: 11554 bytes --]

[-- Attachment #3: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Vim folding/syntax highlighting?
  2010-04-29 21:03 Michael Brand
@ 2010-04-29 22:32 ` Štěpán Němec
  0 siblings, 0 replies; 5+ messages in thread
From: Štěpán Němec @ 2010-04-29 22:32 UTC (permalink / raw)
  To: Michael Brand; +Cc: Org Mode

Michael Brand <michael.brand@alumni.ethz.ch> writes:

> Hi Nathan
>
> Does it matter for you if the modal (i/ESC etc.) editor with the vi key
> bindings that you like to use is run by Vim or Emacs? If not, then you can use
> Emacs with viper-mode as a minor mode for the emulation of the vi key bindings
> together with org-mode as the major mode. This is how I use Emacs and it feels
> just like a Vim that would have the full implementation of the org-mode and
> more.
>
> See also here:
> http://www.gnu.org/software/emacs/manual/html_node/viper/index.html
> http://thread.gmane.org/gmane.emacs.orgmode/17508

...and (if you really want Vim, not Vi) here:

http://www.emacswiki.org/emacs/?action=browse;id=Vimpulse

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Vim folding/syntax highlighting?
@ 2010-04-29 21:03 Michael Brand
  2010-04-29 22:32 ` Štěpán Němec
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Brand @ 2010-04-29 21:03 UTC (permalink / raw)
  To: nathan.neff; +Cc: Org Mode

Hi Nathan

Does it matter for you if the modal (i/ESC etc.) editor with the vi key 
bindings that you like to use is run by Vim or Emacs? If not, then you can 
use Emacs with viper-mode as a minor mode for the emulation of the vi key 
bindings together with org-mode as the major mode. This is how I use Emacs 
and it feels just like a Vim that would have the full implementation of the 
org-mode and more.

See also here:
http://www.gnu.org/software/emacs/manual/html_node/viper/index.html
http://thread.gmane.org/gmane.emacs.orgmode/17508

Michael

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-05-18 13:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-29 18:52 Vim folding/syntax highlighting? Nathan Neff
2010-04-29 21:00 ` Bastien
2010-05-18 13:03   ` Jean-Marie Gaillourdet
2010-04-29 21:03 Michael Brand
2010-04-29 22:32 ` Štěpán Němec

Org-mode mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://orgmode.org/list/0 list/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 list list/ https://orgmode.org/list \
		emacs-orgmode@gnu.org
	public-inbox-index list

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.orgmode
	nntp://news.gmane.io/gmane.emacs.orgmode


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git