High-cornered drawing: Vim can play this way

Source: Internet
Author: User
Tags git clone

There is no shortage of drawing software (such as yed, etc.) on Linux, so why you need to use Vim to draw:

    1. Lighter, no need to install too many things
    2. Smaller, just some text, much smaller than the picture, and easier to use.
    3. More of a force.

So what do we do? First, in vim to install the Drawit plug-in, you can refer to here: Vundle you do not need to find in the tangled where to look for plug-ins and configuration, all the plug-ins are managed in a similar way, to a large extent reduce the cost of use! The path for the plugin to be stored is ~/.vim/bundle/, and the directory is built and downloaded Vundle:

git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/vundle.vim

Later configuration can be completed in ~/.VIMRC:

Set nocompatible                       "Turn off compatibility mode filetype off                           " turns on automatic detection of file types set Rtp+=~/.vim/bundle/vundle.vim      "Join Runtime path call Vundle#begin ()                    "Initialize" plugin list starts plugin ' vundlevim/vundle.vim '          "plug-in list end call Vundle#end ()                      " complete filetype plugin Indent on              "open file type detection

Common plug-in source configurations are:

Plug-ins hosted on Github.comgithub (Plugin ' tpope/vim-fugitive ') vim-scripts.org/vim/scripts.html the plugins maintained at that station (Plugin ' L9 ')

After the configuration is complete, you can start using VIM and use the following command:

:P luginlist: Open plug-in list: Plugininstall: Install plug-in: pluginsearch foo: Search plug-in, found can choose to install: Pluginclean: Clean Unused plugins

As a final example, when you want to install the Winmanager plugin:

Add plugin ' Winmanager ' in. vimrc to open vim execution: pluginlist can see Winmanager plug-in execution: Plugininstall for installation

You can then start the Paint tour and use it in command mode:

\di                    #开启DrawIt \ds                    #关闭DrawIt

After opening there are two modes: Draw and erase, and they switch between them with a space. You can use the keys to control the drawing of lines in eight directions (or erase them):

The top, bottom, left, and right of the arrow keys correspond to their four directions PgUp                 #上右Pgdn                 #下右Home                 #左上End                  #左下

such as (in fact, do not need to remember, and the position on the keyboard is consistent):

                         Home    up   pgup                             \   |   /                               \  |  /                                \ |/                                 \|/left                         ----------right                                /|                               / |                               /  |                               /   |                             End   down  Pgdn

The arrow is also very intuitive, simple arrows with >,, \<, \^, \v to get (feel the thick arrow is not very good control):

>  <|                 _ _      .    \/     /_    '

Use the mouse to select the block, which has a certain simplification of the following operations, using \a (\l without arrows) to draw lines according to the selected block:

-------                                      \-----------                                      \-----------                                      \----->

Or use \b to draw a rectangle or use a \e to draw an ellipse:

+--------------------+          *************      |                    |      ****             ****  |                    |    **                     **+--------------------+    *                       *                          **                     **                            ****             ****                                  *************

It's done. You can use \f to populate the graph:

+------------------+|##################|| ##################|| ##################|+------------------+

There are some deviations in the position that are common, and do not focus on drawing at this time:

Select the block you want to move with the mouse, and then hold down CTRL and drag the mouse.

When you want to erase a whole fast content, use the arrow keys to compare the egg pain, you can use:

Use the mouse to select the part you want to erase, and then execute R (equivalent to replacing with a space).

Also need to note: Ubuntu and mint installed to vim by default is not supported by the system Clipboard, need to install:

sudo apt-get install Vim-gnome

Simple experience, if you can flexibly use the powerful functions of vim itself (copy, paste, etc.), Drawit used up or quite to force! PS: Hint, those arrow symbols are keys on the keyboard, look for it!

Free to provide the latest Linux technology tutorials Books, for open-source technology enthusiasts to do more and better: http://www.linuxprobe.com/

High-cornered drawing: Vim can play this way

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.