AD

Compile Vim In Ubuntu with multi-byte and xterm_clipboard Feature

tag: vim ubuntu make multi-byte encoding xterm clipboard

Reference:

**vim.wikia**/wiki/Building_Vim
**vim.wikia**/wiki/Clipboard
****linuxforums**/forum/newbie/144575-problems-copying-pasting-vim.html

Preface:

I'M a Pure Linux Starter who like command line interface. So I Just installed Ubuntu without GUI 10.04. And later I installed Fluxbox Environment under the instructions here . This article describes How to compile a multi-byte and xterm_clipboard (System Clipboard) supported vim.

Why multi-byte?
I need to work with Chinese files
Why xterm_clipboard?
It will be easy for you copy and paste around in X system. And it is faster than build-in registers when the content is bigger.

Get latest Vim source code:

Pls follow the instructions on Vim's main page

To quickly build a vim:
cd /usr/local/src/vim/src
./configure
# you'd better remove original vim package on you machine before this step
sudo make install


Add multi-byte support:
#replace ./configure with following
./configure --with-features=big


Add xterm_clipboard Support:

Check if your vim supports xterm_clipboard:
  • ": Version" vim command
  • "Vim - version"

There will be a string "-xterm_clipboard or + xterm_clipboard"

Install build dependencies:
"Sudo apt-get install" or "sudo aptitude install":
  • libncurses5-dev
  • libgtk2.0-dev
  • libatk1.0-dev
  • libx11-dev
  • libxt-dev

.configure --with-features=big --enable-gui=gtk2
.make
sudo make install


Clipboard Operation:

When you have a + xterm_clipboard version of vim, you can use following commands to operate system clipboard.
  • "+ Yy or" * yy to copy to clipboard
  • "+ P or" * p to paste from clipboard

Notes:
  • With a multi-byte supported Vim, you also need a correctly configed x-term emulator (encoding). Or the Chinese characters will still be a mess.
  • I did not get a gvim through this process. And I don't know how to do that. But I'm happy because what I need is just s light weight, fast vim in terminal.
  • If you need a vim-gnome, please refer to the first reference link
  • System clipboard will be associated with different vim register on different platforms. It will always be "*" in windows version. And "+" in the build discussed here.
标签: source code, ubuntu, byte, copy and paste, linux, vim, chinese characters, aptitude, preface, x system, registers, command line interface, yy, org forum, system clipboard, clipboard support, gvim, chinese files, clipboard notes, clipboard feature
分类: OS
时间: 2010-12-27

相关文章

  1. Make rails.vim Work: Compile VIM From Sources

    Make rails.vim Work: Compile VIM From Sources Ever heard about rails.vim project? "Accept no imitations: ...
  2. At compile ruby under ubuntu

    Compiler environment nothing to add to that, in fact, do not require ruby basically Quote sudo apt-get install ...
  3. Menubar missing from (g) vim on ubuntu

    $ Rm ~ / .gnome2/Vim
  4. Compile and install Ubuntu 10.04 Feige

    IP Messenger is a LAN which are often used communication tools, the Internet can not find a proper use of a nu ...
  5. 我的VIM配置(ubuntu)

    前几天有位谦虚的高人让我贴一下我的vim配置,就在这里贴一下好了, set nocp "设置兼容 set expandtab "设置tab set shiftwidth=4 "设置tab的间 ...
  6. Compile and install in the mac support different versions of vim python

    In the leopard snow compiled the following different versions of vim. Following through 3 different ways to in ...
  7. Ubuntu下创建vim+Taglist+cscope+ctags组合编辑器

    有人抱怨Linux系统下没有类似于VC之类的方便快捷的编辑器,有人用gedit, 有人用vim,但是都不方便而且也没有自动补全之类的方便用户的功能.本文简单介绍使用vim中的几个插件(Ctags.Cscope和TagLi ...
  8. [Transfer] Vim practical technology, Part 1: Practical Skills

    0. Vim Introduction As the world's most important open source editor (the other one is the Emacs), Vim its pow ...
  9. With Nginx on Ubuntu

    Environment: Ubuntu 10.10 Installing Nginx: sudo apt-get install nginx Nginx HTTP Server book on the recommend ...
  10. [Transfer] Vim practical techniques, Part 1: Practical Skills

    0. Vim Introduction As the world's most important open source editor (the other is the Emacs), Vim its powerfu ...
  11. C-mode vim configuration

    http://renyongjie668.blog.163.com/blog/static/1600531201061081120433/ Vim: build Linux C / C + + programmer's ...
  12. ubuntu w3m text mode access to the Internet

    Ubuntu is installed by default under this stuff, but if you want to install a test machine to take some things ...
  13. [Libjingle 0.4] LibJingle compile guide

    LibJingle (for Ubuntu) compile guide LibJingle (for Win) Compile Guide LibJingle project to restore active Com ...
  14. 配置ubuntu版的lxc容器

    lxc是一种系统层级的虚拟化方案,利用clone这个系统调用的一些特性,模拟一个虚拟化的场景(独立的网络.文件系统),并利用cgroup进行资源的限制管理. 和常见的xen.kvm不同,它不是一种半虚拟化技术,他仅仅使用 ...
  15. 编译vim解决中文支持

    最近开始抛弃Ubuntu折腾CentOS 5.3(注:无意挑起OS之争),每当换一个OS,第一个配置的就是VIM. 介于以前在MacOSX的编译经验,直接三部曲 ./configue && sudo ma ...
  16. Use VIM as Python's IDE

    Used Aptana, Eclipse + PyDev, IDLE, found that VIM can not block completely get rid of the temptation of opera ...
  17. vim shortcut installation and setup problems

    Install sudo apt-get install libncurses-dev ncurses-term wget ftp://ftp.vim.org/pub/vim/unix/vim-7.2.tar.bz2 t ...
  18. Notes compilation of open source software - Linux Kernel

    This is the second article of this series, recording the process of compiling Linux kernel. It is said that co ...
  19. Spring JDBC Practice - Yale CAS login module, a typical customer-oriented

    Project using the Yale CAS + Spring Security to achieve single sign-on, as well as access to the Yale CAS auth ...