Giter Club home page Giter Club logo

unicodeswitch.vim's Introduction

This is a mirror of http://www.vim.org/scripts/script.php?script_id=909

Vim file plugin for editing files with unicode codes.

It changes all of the codes to the accented characters for viewing, and turns all accented characters into the code when writing.

e.g. it changes \u00E9 to é when viewing, and puts \u00E9 when writing (java-style encoding). Set g:ucs_encode_java (in your .vimrc file)

By default, it works for all the accented characters in the Unicode Latin-1 supplement, but you can quickly change it for your needs.

You can also set it to work with html encoding (&#nnn;). Set g:ucs_encode_html (in your .vimrc file)

You can also set it to convert accented characters to octal encoding ( \340 ). Set g:ucs_encode_octal in your
.vimrc file


If you want to turn the switching on and off for reading and/or writing, you can easily do so by commenting out the autocmd lines.  e.g. if you comment out the BufWrite autocmds, then you can read in \u00aa style and write out the utf encoding.  Or, you could swap the BufRead and BufWrite commands, and do the opposite transformation.

for help with the accented characters, see :help digraph

copied/mangled from vimscript #284, which does it for TeX codes

unicodeswitch.vim's People

Contributors

rpilkey avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

adelarsq

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.