Navigation Menu

Skip to content

brymck/konjac_vim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Konjac Vim plugin

This is just a plugin to aid with integrating Konjac, a command-line tool I've written, with Vim. It adds the following functions:

" Translate a single word or phrase
OpenKonjac(from_lang, to_lang, 0, 1, 1)
OpenKonjac(from_lang, to_lang, 1, 1, 1)

" Translate a line
OpenKonjac(from_lang, to_lang, 0, 0, 1)

" Translate word or phrase for entire document
OpenKonjac(from_lang, to_lang, 0, 1, 0)
OpenKonjac(from_lang, to_lang, 1, 1, 0)

" Lookup in Eijiro
LookupInEijiro(0)
LookupInEijiro(1)

Installation

Pathogen

Pathogen is super-great and highly recommended. This assumes the default setup, so adapt as needed (if you're adventurous enough not to follow Mr. Pope's directions, you shouldn't need mine ;) ):

cd ~/.vim
git submodule add git://github.com/brymck/konjac_vim.git bundle/konjac_vim
git submodule init
git submodule update

Vanilla Vim

git clone git://github.com/brymck/konjac_vim.git
cp -r konjac_vim/* ~/.vim

Example

" Translate a single word or phrase from Japanese to English
nnoremap <leader>e :call OpenKonjac("ja", "en", 0, 1, 1)
vnoremap <leader>e :call OpenKonjac("ja", "en", 1, 1, 1)

About

A Vim plugin for using konjac

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published