Solved

Text mode with syntax coloring

Posted on 2009-03-30
2
924 Views
Last Modified: 2013-12-13
I want to start using vim as my main text editor. One of the things I want to do is use it for simple texts, without having to rely on too heavy word processors like Word or OpenOffice. (I will use those when layout is important, but not for this.) I'm curious if there is a mode in Vim that allows me to use a simple text format (like wiki-style) that uses syntax coloring, giving me visual input about the structure of the document.
0
Comment
Question by:R7AF
2 Comments
 
LVL 23

Accepted Solution

by:
Maciej S earned 250 total points
Comment Utility
It is possible. At least partly.
First, you need to turn on syntax highlighting (:syntax on).
Then, you have two possibilities - first is to use predefined syntax for different types of files (see /usr/share/vim/vim71/syntax or similar - depending on vim version and your distribution).
Second option is to create your own syntax. See ":help syntax" to get some ideas on how to create your syntax file.
0
 
LVL 2

Assisted Solution

by:jdevera
jdevera earned 250 total points
Comment Utility
Also, if you are planning to use a well known wiki software, you can search in vim.org and get premade syntax files, for example:

WikiMedia: http://www.vim.org/scripts/script.php?script_id=1787
MoinMoin: http://www.vim.org/scripts/script.php?script_id=1459
Dokuwiki: http://www.vim.org/scripts/script.php?script_id=2374
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now