GithubHelp home page GithubHelp logo

yigitsever / turkish-deasciifier.vim Goto Github PK

View Code? Open in Web Editor NEW

This project forked from joom/turkish-deasciifier.vim

0.0 1.0 0.0 192 KB

Vim plugin to change ASCII text to Turkish text, if you're not using a TR keyboard

Vim Script 100.00%

turkish-deasciifier.vim's Introduction

turkish-deasciifier.vim

demo.mp4

This plugin is a fork of joom/turkish-deasciifier.vim that introduces opfunc variants of the functions. The original plugin pipes visual selection into a Turkish deasciifier. This fork lets you use operator {motion}, just like any other operator of vim (c, y etc.) Turkish deasciifier is based on Deniz Yüret's turkish-mode.

There are three functions, one to deasciify over a motion using turkish-mode, one to brute force the deasciification (to fix what turkish-mode might have missed) and one to asciify Turkish characters.

You can create key mappings for it like this in your .vimrc file:

" brute force deasciify everything
nnoremap <expr> <Leader>tc TurkishDeasciifyForce()
xnoremap <expr> <Leader>tc TurkishDeasciifyForce()
nnoremap <expr> <Leader>tctc TurkishDeasciifyForce() .. '_'

" use turkish-mode to selectively deasciify
nnoremap <expr> <Leader>tr TurkishDeasciify()
xnoremap <expr> <Leader>tr TurkishDeasciify()
nnoremap <expr> <Leader>trtr TurkishDeasciify() .. '_'

" ascii everything
nnoremap <expr> <Leader>rt TurkishAsciify()
xnoremap <expr> <Leader>rt TurkishAsciify()
nnoremap <expr> <Leader>rtrt TurkishAsciify() .. '_'

Requirements

A Turkish deasciifier executable has to be installed alongside the plugin. There are several ports of it in different languages.

1) emres/turkish-deasciifier Turkish deasciifier in Python. If you are on Arch Linux, this is available on AUR.

paru turkish-deasciifier-git

2) f/deasciifier is the easier version to install if you have node and npm installed. This command would install the deasciifier:

npm install deasciifier -g

Then you have to include this line in your .vimrc file:

let g:turkish_deasciifier_path = 'deasciify'

3) joom/turkish-deasciifier.hs is another easy version to install if you have Haskell installed (cabal and ghc). This command would install the deasciifier:

cabal install turkish-deasciifier

Then you have to include this line in your .vimrc file:

let g:turkish_deasciifier_path = 'turkish-deasciifier'

Installation

Install it using your plugin installation method of choice.

Plug 'yigitsever/turkish-deasciifier.vim'

License

MIT

turkish-deasciifier.vim's People

Contributors

joom avatar yigitsever avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.