Редакторы для linux vim

Как установить редактор Vim в системах Linux

Редактор Vim был разработан в 1976 году и назвался Vi. В те времена он предлагал пользователям традиционные функции. Такие как эффективный интерфейс редактирования текста, терминальное управление и многое другое.

Однако ему не хватало некоторых полезных и удобных функций, таких как:

  1. Работа на нескольких экранах.
  2. Подсветка синтаксиса.
  3. И так далее.

Многие пользователи Unix/Linux искали в эти функции в других текстовых редакторах.

С того времени редактор Vi очень преобразился. И в наше время он стал частью OS LINUX.

Сейчас Vim — это мощный, легко настраиваемый, популярный и кроссплатформенный текстовый редактор. Работающий в Unix системах, таких как:

Так что, редактор Vim (Vi Improved) был разработан, чтобы предоставить пользователям полнофункциональный, продвинутый и полный текстовый редактор.

Он многофункционален и очень расширяем. В Vim можно установить плагины и он превратится в нечто большее, чем простой текстовый редактор.

Особенности Vim

Ряд его примечательных особенностей включают в себя:

  1. Постоянное, многоуровневое дерево отмены.
  2. Поддержка нескольких экранов.
  3. Высокая расширяемость с использованием нескольких плагинов.
  4. Предлагает пользователям мощный, быстрый и надежный инструмент поиска.
  5. Поддерживает несколько языков программирования и форматов файлов.
  6. Поддерживает и интегрируется с многочисленными инструментами и многим другим.

Спустя десять лет после внесения серьезных изменений в Vim. Новый и улучшенный релиз Vim 8.2 вышел и уже доступен для установки. Он поставляется с некоторыми важными улучшениями, несколькими исправлениями ошибок и новыми функциями, перечисленными ниже:

Новые функции в Vim 8.2

  1. Асинхронная поддержка ввода-вывода, каналы, JSON.
  2. Таймеры.
  3. Поддерживает партиалы, лямбды и замыкания.
  4. Позволяет проводить тестирование нового стиля.
  5. Viminfo объединен по метке времени.
  6. Поддержка GTK+3.
  7. Поддержка MS-Windows DirectX.

Как установить редактор Vim в системах Linux

В большинстве современных дистрибутивов Linux вы можете установить Vim editor из репозиториев по умолчанию. Например это можно сделать с помощью диспетчера пакетов, но доступная там версия, буден немного немного старше чем последняя.

$ sudo apt install vim [на Debian, Ubuntu и Mint]
$ sudo dnf install vim [на RHEL, CentOS и Fedora]
$ sudo pacman-S vim [на Arch Linux и Manjaro]
$ sudo zypper install vim [на OpenSuse]

Хотя Vim 8.2 уже вышел и доступен. Но пройдет немало времени прежде чем он попадет в официальные репозитории программного обеспечения, для различных дистрибутивов Linux.

К счастью пользователи Ubuntu, Mint и Debian могут использовать. Из неофициального но ненадежного PPA. Для установки последней версии Vim введите команды:

$ sudo add-apt-repository ppa:jonathonf/vim
$ sudo apt update
$ sudo apt install vim

После установки вы можете запустить vim из командной строки и просмотреть информацию о нем/

Чтобы удалить редактор Vim и вернуться к более старой версии в репозитории Ubuntu. Требуется выполнить следующие команды для очистки PPA:

$ sudo apt install ppa-purge
$ sudo ppa-purge ppa:jonathonf/vim

Компиляция Vim из исходных текстов в Linux

Для других дистрибутивов Linux потребуется некоторое время, чтобы vi включили в официальные репозитории. Но вы можете попробовать последнюю версию Vim 8.0, скомпилировав ее из исходного кода самостоятельно. Выполните в терминали команды, как показано ниже:

Установка На Debian Ubuntu и Mint

$ sudo apt install ncurses-dev
$ wget https://github.com/vim/vim/archive/master.zip
$ unzip master.zip
$ cd vim-master
$ cd src/
$ ./configure
$ make
$ sudo make install
$ vim

Установка На RHEL CentOS и Fedora

# yum install ncurses-devel
# wget https://github.com/vim/vim/archive/master.zip
# unzip master.zip
# cd vim-master
# cd src/
# ./configure
# make
# sudo make install
# vim

Пользователи Arch могут установить последнюю версию Vim с помощью pacman, командой:

Для других дистрибутивов Linux вы можете скачать его и установить самостоятельно:

Источник

Забудьте про свой редактор. Используйте Vim

Получайте удовольствие от процесса редактирования текста.

Вступление

Здравствуй, дорогой читатель! Данная статья не является ни руководством, ни учебником. В этой статье я лишь хочу рассказать Вам, что существует более эффективный инструмент для работы с текстовыми файлами. Этой статьёй я хочу вдохновить Вас на то, чтобы, поборов глубоко вросшие в Вас привычки, Вы попробовали совершенно другой, не похожий ни на что, метод работы с текстом.

Здесь я обойдусь и без истории возникновения Vim. Скажу лишь, что главный разработчик этого замечательного редактора — Брам Мооленаар, а произошёл он от стандартного редактора Unix — Vi, автором которого был Билл Джой.

Vi был создан в далёком 1976 году. Тогда же и был придуман его необычный интерфейс, основанный на разделении режимов работы на: нормальный, режим вставки и режим командной строки. Пусть многие спорят, что такой подход возник лишь вследствие ограничений техники тех времён, но я утверждаю, что этот метод работы эффективнее всего того, что предлагают нам другие редакторы.

Читайте также:  All windows build numbers

Истинную мощь Vim демонстрирует при работе с текстами имеющими некоторую структуру, т.е. он незаменим для программистов и верстальщиков, но многие его возможности очень помогут и при работе с простым текстом.

Я также предполагаю, что Вы умеете или учитесь печатать вслепую и не сомневаетесь в том, что этот навык чрезвычайно полезен. Если же у Вас есть сомнения на этот счёт, то предлагаю прочесть небольшое отступление.

Печатайте вслепую!

Почему просто необходимо печатать вслепую?

Вспомните, как вы учились кататься на велосипеде! Сначала вы мучились, пытаясь понять, как же это делают остальные, не могли проехать и двух метров. Но вы старались! Вы пробовали ещё и ещё. Может быть час, день или даже несколько дней. Пока не почувствовали.

Помните, насколько приятным было то ощущение, когда вы впервые почувствовали, что нужно делать, и будто стали с велосипедом одним целым? А потом вы к этому быстро привыкли и забыли, что бывает иначе…

Если Вы не помните, как учились ездить на велосипеде, вспомните, как учились плавать или кататься на коньках, вспомните любое своё умение!

Так раз уж если Вам приходится пользоваться компьютером — получайте удовольствие от общения с клавиатурой, вместо того, чтобы постоянно ощущать этот ужасный 100-кнопочный барьер (с двухкнопочным в придачу) между вами и компьютером (и теми, с кем вы посредством компьютера общаетесь).

Печатайте мысли, а не буквы и слова!

Vim — редактируйте вслепую!

То же славное ощущение, про которое я говорил выше, появляется и в Vim’е.

Если вы просто печатаете вслепую, ты вы с удовольствием вводите текст, не задумываясь на процессом.

Овладев Vim’ом, вы начинаете вслепую редактировать текст:

  • быстро, без всяких полос прокрутки, перемещаться по структуре документа,
  • также быстро переключаться между множеством открытых документов,
  • легко манипулировать любыми блоками текста: словами, предложениями, блоками кода,
  • (список можно продолжать очень долго — смотрите материалы в конце статьи),
  • и даже писать на ходу макросы для повторяющихся действий.

И всё это вслепую, не отрывая рук от клавиатуры, не пользуясь никакими элементами интерфейса и не используя сложных комбинаций клавиш Alt, Ctrl и т.п. Вместо этого, лишь используя по большей части легко запоминающиеся команды.

Ценой такого удовольствия является, как говорят, высокий барьер вхождения, т.е. сложный и небыстрый период освоения. Но это тот самый случай, когда единственной возможностью повысить качество работы является вложение времени в обучение.

Вы готовы меняться?

Итак, если Вас не пугают трудности на пути освоения совершенно другого инструмента, если Вас привлекают те перспективы, о которых я рассказал, я могу предложить Вам материалы, используя которые Вы покорите этот редактор.

Источник

Downloading Vim

Most popular:

MS-Windows: Recent and signed MS-Windows files are available on the vim-win32-installer site
The current stable version is gvim_8.2.2825.exe.
An alternative is the standard self-installing executable, currently version 8.2.2824.
Unix: See the GitHub page, or Mercurial, if you prefer that. There is also an Appimage which is build daily and runs on many Linux systems.
Mac: See the MacVim project for a GUI version and Homebrew for a terminal version

Details and options for:

  • Unix
  • PC: MS-DOS and MS-Windows
  • Amiga
  • OS/2
  • Macintosh
  • Others
Mirrors Alternative sites to download Vim files from.
Sources Build Vim yourself and/or make changes.
GitHub Obtain Vim sources with a git client (recommended).
Mercurial Obtain Vim sources with a Mercurial client (recommended if you don’t like git).
Patches Include the latest improvements (requires sources and rebuilding).
Runtime Get the latest syntax files, documentation, etc..
Script links Links to individual syntax, indent, color, compiler and ftplugin scripts.
Translations Non-English documentation packages.

Versions before 7.3 can also be obtained with Subversion and CVS.

Version

To avoid having to update this page for every new version, there are links to the directories. From there select the files you want to download. In the file names ## stands for the version number. For example, vim##src.zip with version 8.2 is vim82src.zip and vim-##-src.tar.gz for version 8.2 is vim-8.2-src.tar.gz. Links are provided for quick access to the latest version.
Note that the links point to the latest version (currently 8.2) to avoid that caching causes you to get an older version.

You need to download at the sources and the runtime files. And apply all the latest patches. For Vim 6 up to 7.2 you can optionally get the «lang» archive, which adds translated messages and menus. For 7.3 and later this is included with the runtime files. Using git This is the simplest and most efficient way to obtain the latest version, including all patches. This requires the «git» command.
The explanations are on the GitHub page.

Summary: Using Mercurial This is another simple and most efficient way to obtain the latest version, including all patches. This requires the «hg» command.
The explanations are on this page: Mercurial

Summary: version 7.x and 8.x There is one big file to download that contains almost everything. It is found in the unix directory (ftp):

The runtime and source files together: vim-##.tar.bz2 vim-8.2.tar.bz2 (ftp)

The files ending in «.tar.gz» are tar archives that are compressed with gzip. Unpack them with tar -xzf filename .
The single big file ending in «.tar.bz2» is a tar archive compressed with bzip2. Uncompress and unpack it with bunzip2 -c filename | tar -xf — .
All archives should be unpacked in the same directory.

If you can’t compile yourself or don’t want to, look at the site of the supplier of your Unix version for a packaged Vim executable. For Linux distributions and FreeBSD these are often available shortly after a new Vim version has been released. But you can’t change the features then.

  • Debian packages are available at: http://packages.debian.org/vim.
  • Sun Solaris Vim is included in the Companion Software: http://wwws.sun.com/software/solaris/freeware/.
    Vim for other Sun systems can be found at http://sunfreeware.com/.
  • HPUX with GTK GUI for various HPUX versions: http://hpux.its.tudelft.nl/hppd/hpux/Editors/vim-6.2/ or http://hpux.connect.org.uk/hppd/hpux/Editors/vim-6.2/ (note that the remark about the GNU GPL is wrong)

PC: MS-DOS and MS-Windows

If you want a signed version you can get a build from
vim-win32-installer
It supports many interfaces, such as Perl, Tcl, Lua, Python and Ruby. There are also 64bit versions which only run on 64 bit MS-Windows and use a lot more memory, but is compatible with 64 bit plugins.
You can also get a nightly build from there with the most recent improvements, with a small risk that something is broken.

Since there are so many different versions of MS operating systems, there are several versions of Vim for them.
For Vim 5.x, Vim 6.x and Vim 7 look in the pc directory (ftp). Self-installing executable gvim##.exe gvim82.exe (ftp) For Vim 6 and later. This includes a GUI version of Vim — with many features and OLE support — and all the runtime files. It works well on MS-Windows 95/98/ME/NT/2000/XP/Vista/7. Use this if you have enough disk space and memory. It’s the simplest way to start using Vim on the PC. The installer allows you to skip the parts you don’t want.
For Vim 6.3 and later it also includes a console version, both for MS-Windows 95/98/ME and MS-Windows NT/2000/XP/Vista/7. The installer automatically selects the right one. Runtime files vim##rt.zip vim82rt.zip (ftp) For all the following binary versions you need this runtime archive, which includes the documentation, syntax files, etc. Always get this, unless you use the self-installing executable.

There are three versions that run as an MS-Windows application. These provide menus, scrollbars and a toolbar. GUI executable gvim##.zip gvim82.zip (ftp) This is the «normal» GUI version. OLE GUI executable gvim##ole.zip gvim82ole.zip (ftp) A GUI version with OLE support. This offers a few extra features, such as integration with Visual Developer Studio. But it uses quite a bit more memory. There are three versions that run on MS-DOS or in a console window in MS-Windows: Win32 console executable vim##w32.zip vim82w32.zip (ftp) The Win32 console version works well on MS-Windows NT/2000/XP/Vista/7. It supports long file names and is compiled with «big» features. It does not run perfectly well on MS-Windows 95/98/ME, especially when resizing the console window (this may crash MS-Windows. ). 32 bit DOS executable vim##d32.zip vim73_46d32.zip (ftp) The 32 bit DOS version works well on MS-Windows 95/98/ME. It requires a DPMI manager, which needs to be installed on MS-DOS. MS-Windows already has one. It supports long file names, but NOT on MS-Windows NT/2000/XP/Vista/7. It is compiled with «big» features.
Not available for 7.4 and later. 16 bit DOS executable vim##d16.zip vim71d16.zip (ftp) The 16 bit DOS version is the only one that runs on old MS-DOS systems. Only use this if you are really desparate, because it excludes many useful features (such as syntax highlighting and long file names) and quickly runs out of memory.
The last version available is 7.1. Version 7.2 and later are too big to fit in the DOS memory model. There are a few extra files: iconv library libiconv A library used for converting character sets. Put «iconv.dll» in the same directory as gvim.exe to be able to edit files in many encodings. You can find the dll file in the bin directory of the «libiconv-win32» archive. newer intl library libintl The included libintl.dll does not support encoding conversion. If you have installed the iconv library, as mentioned above, you can install a gettext library that uses it. Get «intl.dll» from the bin directory in the gettext-win32 archive and store it as «libintl.dll» in the same directory as gvim.exe, overwriting the file that may already be there. PC sources vim##src.zip vim82src.zip (ftp) The source files, packed for the PC. This only includes the files needed on the PC, not for other systems. The files are in dos format CR-LF. PC debug files gvim##.pdb gvim82.pdb (ftp) gvim##ole.pdb gvim82ole.pdb (ftp) vim##w32.pdb vim80w32.pdb (ftp) When you notice a bug or a crash in Vim these files can be used to help tracing down the problem. In Vim 7 do «:help debug-win32» to see how. PC translations vim##lang.zip vim72lang.zip (ftp) Only for 7.2 and earlier, for 7.3 and later these are included in the «rt» archive. Translated messages and menu files, packed for the PC. Use this to see non-English menus. The messages are only translated when the libintl.dll library is installed. Windows 3.1 GUI executable gvim##w16.zip and gvim##m16.zip These are GUI versions for 16 bit windows (Windows 3.1). The «w16» has many features, «m16» has few features (for when you’re short on memory). The files ending in «.zip» can be unpacked with any unzip program. Make sure you unpack them all in the same directory!

Yongwei’s build You may also try Yongwei’s build, executables with slightly different interfaces supported. Cream For an unofficial version that used to include all the latest patches and optionally a bit more: Cream. The «one-click installer» mentioned includes the Cream changes. For the «real Vim» use the «without Cream» version listed further down.
Unfortunately, it stopped updating since Vim 8.0. Cygwin For a Cygwin binary look at others.

Amiga

For Vim 5.x and Vim 6 look in the amiga directory (ftp).
Vim 7 files can be found at os4depot.net. This is for AmigaOS 4. Made by Peter Bengtsson. Runtime files vim##rt.tgz vim64rt.tgz (ftp) Documentation, syntax files, etc. You always need this. Executable vim##bin.tgz vim64bin.tgz (ftp) The executables for Vim and Xxd. For Vim 6 it includes «big» features, for Vim 5.x it includes the normal features. For Vim 6.2 it is not available (my Amiga had harddisk problems then, this miraculously healed later). Big executable vim##big.tgz Vim with «big» features and Xxd. Only for Vim 5.x. Sources vim##src.tgz vim64src.tgz (ftp) The source files for the Amiga. Only needed when you want to compile Vim yourself. The files are all tar archives, compressed with gzip. To unpack, first uncompress them with gzip -d filename . Then unpack with tar xf filename . You need to unpack the archives in the same directory.

For Vim 5.x and Vim 6 look in the os2 directory (ftp). Version 6.2 is not available. Versions 6.3 and 6.4 were compiled by David Sanders.
Version 7.0 was compiled by David Sanders. Runtime files vim##rt.zip vim70rt.zip (ftp) Documentation, syntax files, etc. You always need this. Executables vim##os2.zip vim70os2.zip (ftp) Vim, Xxd, Tee and EMX libraries. The files ending in «.zip» can be unpacked with any unzip program. Make sure you both zip archives in the same directory!

If you want to compile the OS/2 version, you need the EMX compiler. Use the Unix source archive, runtime files and the extra archive. After unpacking the runtime archive, move all the files and directories in the «runtime» directory one level up.

Macintosh

MacVim

MacVim has more a Mac look and feel, is developed actively and most people prefer this version. Most of MacVim was made by Bjцrn Winckler.

New versions are made quite often. Subscribe to the vim-mac maillist to be informed about bugs and updates.

Homebrew

Older

Older binaries for Mac OS/X can be found on this SourceForge project. Maintained by Nicholas Stallard.

Here is a multi-byte version of Vim 5.7 (for Japanese, possibly also for Korean and Chinese; not for Unicode):
http://www-imai.is.s.u-tokyo.ac.jp/

Background

Most of the work for the Macintosh port (Classic and Carbon) was done by Dany St-Amant.

If you have OSX and a setup for compiling programs, you can use the source code and compile yourself. See the Unix section above. The development tools can be downloaded from Apple’s developer web site.

Turn to the vim-mac maillist to meet other Vim-Mac users.

Источник

Читайте также:  The latest transfer windows
Оцените статью