bug-gtypist
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gtypist] GNU Typist vim question


From: Felix Natter
Subject: Re: [bug-gtypist] GNU Typist vim question
Date: Fri, 11 Jul 2014 21:57:47 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.3 (gnu/linux)

Caleb Shepard <address@hidden> writes:

> Hello,

hi Caleb!

> So I discovered the excellent Gnu Typist and Vim the same day and really 
> wanted to use the
> gtypist syntax file (gtypist.vim) with gtypist but have struggled to get it 
> to be picked
> up.. 

Music to my ears... ;-)

> I have tried many things but here is an example of the latest order that i 
> tried.

Is there a reason why you don't put it in the user config?

This works for me (Debian Linux; from the gtypist 2.9.4 docs):

- create ~/vim/syntax
- copy gtypist.vim to ~/vim/syntax
- use such a ~/.vimrc:

autocmd!
autocmd BufNewFile,BufRead *.typ setf gtypist

syntax on

Now open i.e. gtypist-2.9.4/lessons/c.typ, should be colored now.
Once that works, we can try a systemwide installation (do you need that?)

Good Luck and Best Regards,
Felix

> using vim 7.3 that comes installed on os x 10.9.3 :
>
> The Directory structure is :
>
> /usr/share/vim/vim73 
>
> /usr/share/vim/vimrc
>
> /usr/share/vim/vim73/syntax
>
> /usr/share/vim/vim73/tools
>
> step 1. “ cp vimrc_example.vim /usr/share/vim/vimrc “ and added these three 
> lines to the
> very top of file (sudo vim vimdc) : autocmd!
>
>            autocmd BufNewFile,BufRead *.typ setf gtypist
>
>            syntax on
>
> step 2 : downloaded gtypist gtypist-2.9.4.tar.gz from 
> http://ftp.gnu.org/gnu/gtypist/ and
> cp tools/gtypist.vim to /usr/share/vim/vim73/syntax/
>
> step 3 : installed homebrew package manager for os x and did a brew install 
> gnu-typist
> which installed gnu-typist 2.9.4
>
> when i do :set ft? in vi as indicated i just get filetype=
>
> when i start a lesson in gnu typist nothing has changed
>
> Is there anything missing to make this happen? I took a look at the 
> gtypist.vim file but
> don’t really see where it expects it to be. 
>
> I’ve tried just about everything listed on section 8 of this file below 
> including making
> the vimrc for system and user, i also ran :version command in vim and tried 
> installing the
> user and system vimrc files with the additional three lines added, although 
> the file was
> picked up fine from /usr/share/vim/vimrc because the syntax is multicolored 
> when working in
> vim. just not in the gtypist program. 
>
> I am not opposed to any method to get this working. 
>
> Thank you for your help, it is very much appreciated.
>
> -Caleb
>
> *************Documentation*********************
>
> 8 VIM Syntax highlighting from  (http://www.gnu.org/software/gtypist/doc/)
>
> File tools/gtypist.vim provides vim syntax highlighting for gtypist lesson 
> files (vim 5.x,
> 6.x and 7.x (and higher)).
>
> To install it for version 5.x (or any version on Windows), copy the file to 
> where the
> syntax-files go (for example /usr/share/vim/vim56/syntax/ for Vim 5.6; if 
> everything else
> fails you can search for e.g. xml.vim) and add this to ~/.vimrc ($HOME/_vimrc 
> on Windows):
>
> autocmd BufNewFile,BufRead *.typ set ft=gtypist 
>
> Installation for Vim >= 6.x is simpler: first create ~/.vim/syntax/: mkdir -p 
> ~/.vim/
> syntax and put tools/gtypist.vim in there. Finally add this to ~/.vimrc:
>
> autocmd BufNewFile,BufRead *.typ setf gtypist
>
> In case you are using the debian package, gtypist.vim will already be 
> installed for you,
> but you need to enable it explicitly:
>
> sudo apt-get install vim-addon-manager
> vim-addons install gtypist
>
> In any case, make sure that the vimrc file has the following command at the 
> top ahead of
> all other autocmd-commands:
>
> autocmd!  " Remove ALL autocommands for the current group
>
> (which avoids problems if vimrc is sourced more than once). And if you 
> haven\’t done it
> already, you need to enable syntax highlighting (this may need to be before 
> the autocmd ...
> gtypist).
>
> syntax on " turn on syntax highlighting
>
> You can verify that tools/gtypist.vim is active by running :set ft? in vim, 
> which should
> return filetype=gtypist.
>
> All of this is also mentioned in the README-section of tools/gtypist.vim.
>

-- 
Felix Natter



reply via email to

[Prev in Thread] Current Thread [Next in Thread]