Solved

Text mode with syntax coloring

Posted on 2009-03-30
2
927 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
ID: 24023362
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
ID: 24026987
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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
eclipse error 7 99
Java eclipse error 2 68
Android studio getdrawable(int) is deprecated 4 82
What is the Best Editor for PHP Development ? 5 73
Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

786 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