விம்
விம் (வி மேம்படுத்தப்பட்டது) என்பது வி என்னும் உரை திருத்தியை மூலமாக கொண்டு உருவாக்கப்பட்ட உரை திருத்தியாகும். இதை கட்டளை-வரி மூலமாகவோ அல்லது வரைகலைப் பணிச்சூழலுடன் கூடிய செயலி மூலமாகவோ பயன்படுத்தலாம்.
விம் உரைத்திருத்திக்கு மாற்றாகப் பயன்படுத்தப்படும் நீயோ விம் உடன் இதைக் குழப்பிக்கொள்ள வேண்டாம்.
நிறுவல்
USE கொடிகள்
USE flags for app-editors/vim Vim, an improved vi-style text editor
X
|
Link console vim against X11 libraries to enable title and clipboard features in xterm |
acl
|
Add support for Access Control Lists |
crypt
|
Use dev-libs/libsodium for crypto support |
cscope
|
Enable cscope interface |
debug
|
Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see https://wiki.gentoo.org/wiki/Project:Quality_Assurance/Backtraces |
gpm
|
Add support for sys-libs/gpm (Console-based mouse driver) |
lua
|
Enable Lua scripting support |
minimal
|
Install a very minimal build (disables, for example, plugins, fonts, most drivers, non-critical features) |
nls
|
Add Native Language Support (using gettextGNU locale utilities) |
perl
|
Add optional support/bindings for the Perl language |
python
|
Add optional support/bindings for the Python language |
racket
|
Enable support for Scheme using dev-scheme/racket |
ruby
|
Add support/bindings for the Ruby language |
selinux
|
!!internal use only!! Security Enhanced Linux support, this must be set by the selinux profile or breakage will occur |
sound
|
Enable sound support |
tcl
|
Add support the Tcl language |
terminal
|
Enable terminal emulation support |
vim-pager
|
Install vimpager and vimmanpager links |
Emerge
X Window System உடைய துணை தேவையில்லை என்றால், app-editors/vim ஐ நிறுவவும்:
root #
emerge --ask app-editors/vim
கூடுதல் மென்பொருள்
G விம்
விம் ஐ ncurses அடிப்படையிலான பணிச்சூழல் மற்றும் வரைகலைப் பணிச்சூழல் (X Window System ற்காக) ஆகியவற்றோடு நிறுவ, app-editors/gvim ஐ நிறுவவும்:
root #
emerge --ask app-editors/gvim
தொகுப்புகள்
விம் இல் தொகுப்புகளுக்கான ஆதரவு உள்ளது, இதன்மூலம் செயல்பாடுகளை விரிவுபடுத்துவதற்கான நாட்டக செயல்படு முறையை இது அளிக்கிறது. மேலும் விவரங்களுக்கு உள்ளமைக்கப்பட்ட தொகுப்புகள் ஆவணப்படுத்தலைப் படிக்கவும்: :help packages
மேம்பாட்டு-நிரல்கள்
app-vim என்னும் பிரிவில் கூடுதல் இலக்கணவிதிகள், மேம்பாட்டு-நிரல்கள் மற்றும் பல விம் சார்ந்த பொருட்களை அளிக்கிறது.
app-vim பிரிவில் உள்ள தொகுப்புகளை என்னென்ன என்பதை அறிய emerge அல்லது eix ஐ பயன்படுத்தவும்:
user $
emerge --search "%@^app-vim"
user $
eix -cC app-vim
Not all Vim plugins will be available in the Gentoo repository. Vim now includes native packages, as a way to install plugins, and there are also several plugin managers for Vim.
உள்ளமைவு
கோப்புகள்
விம்மை ஒவ்வொரு பயனாளருக்கும் தனித்தனியாக உள்ளமைக்கலாம் அல்லது கட்டமைப்பளாவிய உள்ளமைவு கோப்பைக் கொண்டும் உள்ளமைக்கலாம்:
- /etc/vim/vimrc - கட்டமைப்பளாவிய (உலகளாவிய) அமைப்புகளின் கோப்பு.
- ~/.vimrc - பயனர்-சார்ந்த (உள்ளூர்) அமைப்புகளின் கோப்பு. அலைக்குறி (~) பயனரின் home அடைவில் இருப்பதைக் குறிக்கிறது.
- ~/.vim/pack/foo - செருகுநிரல்கள் நிறுவப்பட்டுள்ள இடம் (விம் 8 அல்லது அதற்கும் மேல்).[1]foo இற்கு பதிலாக ஒவ்வொரு செருகுநிரலின் பெயரை இடவும்.
வண்ணத் திட்டம்
விம் தொகுப்பு பன்னிரண்டிற்கும் அதிகமான வண்ணத் திட்டங்களைக் கொண்டுள்ளது. இந்த பட்டியலைக் காண விம் இனுல் colorscheme என இட்ட பின் Ctrl+d என்னும் விசை சேர்க்கையை அளிக்கலாம் அல்லது Tab என்னும் விசையை இருமுறை தட்டலாம்:
:
colorscheme
blue darkblue default delek desert elflord evening industry koehler morning murphy pablo peachpuff ron shine slate torte zellner
விம் இல் colorscheme அல்லது colo என்னும் கட்டளையை அடுத்து உங்கள் விருப்பமான வண்ணத் திட்டத்தை இட்டு கடைசி வரி பயன்முறையில் மாற்றிக்கொள்ளலாம்:
:
colorscheme peachpuff
வண்ணத் திட்டங்களை நிரந்தரமாக .vimrc என்னும் கோப்பினுள் அமைக்கலாம்:
~/.vimrc
colorscheme peachpuff syntax on
முதல் வரி முன்னிருப்பு வண்ணத் திட்டத்தை அமைக்கிறது, கடைசி வரி வண்ணத் திட்ட பயன்பாட்டை இயக்குகிறது.
வி உரை திருத்தி மற்றும் முறைமை முன்னிருப்பு உரை திருத்தியை தேர்ந்தெடுத்தல்
If Vim - and only Vim - is installed, the vi command should launch Vim. If other vi-like editors are installed, eselect may be used to choose which editor the vi command launches.
The text editor article may also be of interest for setting a system default editor, if Vim is to be set as the default.
பயன்பாடு
தொடங்குதல்
கட்டளைவரியில் இருந்து:
user $
vim --help
vim --help VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Nov 26 2021 11:56:27) Usage: vim [arguments] [file ..] edit specified file(s) or: vim [arguments] - read text from stdin or: vim [arguments] -t tag edit file where tag is defined or: vim [arguments] -q [errorfile] edit file with first error Arguments: -- Only file names after this -v Vi mode (like "vi") -e Ex mode (like "ex") -E Improved Ex mode -s Silent (batch) mode (only for "ex") -d Diff mode (like "vimdiff") -y Easy mode (like "evim", modeless) -R Readonly mode (like "view") -Z Restricted mode (like "rvim") -m Modifications (writing files) not allowed -M Modifications in text not allowed -b Binary mode -l Lisp mode -C Compatible with Vi: 'compatible' -N Not fully Vi compatible: 'nocompatible' -V[N][fname] Be verbose [level N] [log messages to fname] -D Debugging mode -n No swap file, use memory only -r List swap files and exit -r (with file name) Recover crashed session -L Same as -r -A Start in Arabic mode -H Start in Hebrew mode -T <terminal> Set terminal type to <terminal> --not-a-term Skip warning for input/output not being a terminal --ttyfail Exit if input or output is not a terminal -u <vimrc> Use <vimrc> instead of any .vimrc --noplugin Don't load plugin scripts -p[N] Open N tab pages (default: one for each file) -o[N] Open N windows (default: one for each file) -O[N] Like -o but split vertically + Start at end of file +<lnum> Start at line <lnum> --cmd <command> Execute <command> before loading any vimrc file -c <command> Execute <command> after loading the first file -S <session> Source file <session> after loading the first file -s <scriptin> Read Normal mode commands from file <scriptin> -w <scriptout> Append all typed commands to file <scriptout> -W <scriptout> Write all typed commands to file <scriptout> -x Edit encrypted files --startuptime <file> Write startup timing messages to <file> -i <viminfo> Use <viminfo> instead of .viminfo --clean 'nocompatible', Vim defaults, no plugins, no viminfo -h or --help Print Help (this message) and exit --version Print version information and exit
The vi command may also be used to launch Vim, if so configured.
Specify a name, to open an existing file, or to create a new one:
user $
vim <filename>
பயிற்சி
விம் அதனுள் குறைந்தது 30 நிமிடங்களில் முடிக்கக்கூடிய உள்ளமைந்த பயிற்சி வகுப்பைக் கொண்டுள்ளது. vimtutor என்னும் கட்டளையைக் கொண்டு இதைத் துவக்கலாம்:
user $
vimtutor
உதவிக்குறிப்புகள்
விம்மை ex அல்லது ed போன்று கட்டளை-வரியில் பயன்படுத்துதல்
விம்மை ஒரு-வரி கட்டளையாக பயன்படுத்த முடியும். இவ்வகை கட்டளைகளை ஆணைத்தொடரில் அல்லது கட்டளை-வரியில் இட்டு கோப்பை திறக்காமலே மாற்றங்களை செய்யலாம்.
எடுத்துக்காட்டாக, பின்வரும் கட்டளை #
என்னும் குறியை file.txt என்னும் கோப்பில் உள்ள ஒவ்வொரு வரியின் துவக்கத்திலும் இடும்:
user $
vim -c ":%s/^/#/g" -c ":x" file.txt
இதில் என்ன நடக்கிறது என்றால் விம் தனக்கு -c
விருப்பத்தேர்வு மூலம் அளிக்கப்பட்ட கட்டளையின் பொருளுணர்கிறது. முதல் கட்டளை விம்மின் ஈடுசெய் கட்டளையாகும் (sed ஐ ஒத்த கட்டளை), இரண்டாம் கட்டளை விம் ஐ செயல் முடிந்தவுடன் கோப்பை சேமித்து பின் மூட உத்தரவிடுகிறது
கோப்பு குறிமுறையேற்றத்தை மாற்றுதல்
ஒரு கோப்பின் கோப்பு குறிமுறையேற்றத்தை UTF-8 ற்கு மாற்ற, பின்வரும் கட்டளையை (கடைசி வரி பயன்முறையில்) இடவும்:
:
e ++enc=utf8
மேலே கூறிய வித்தையை கட்டளை-வரியிலும் பயன்படுத்த இயலும்:
user $
vim -c ":wq! ++enc=utf8" file.txt
Troubleshooting
I'm trapped in vim!
For someone entering vim without knowing how to use it, it may not be evident how to quit.
Press esc several times, then :, q, enter. To quit without saving, press esc several times, then :, q, !, enter.
If several files are open, try pressing esc several times, then :, q, a, enter. To quit without saving, press esc several times, then :, q, a, !, enter.
If this doesn't help, and desperate measures are needed, something like killall vim may be a last ditch solution (from another terminal). Beware that this will terminate all the vim sessions for a user, without saving. If run as root, such a command will terminate all vim sessions for all users on the system.
இதையும் காண்க
- விம் வழிகாட்டி - விம்மை எவ்வாறு பயன்படுத்த வேண்டும் என்பதை விரிவாக விளக்கும் பக்கம்.
வெளிப்புற வளங்கள்
- விம் ஆவணப்படுத்தல் இதில் கையேடுகள் (என அழைக்கப்படும் :help மற்றும் விலையில்லா VIM OPL நூல்), அடிக்கடி கேட்கும் கேள்விகள், HOWTO's, பயிற்சி வகுப்புகள் ஆகியவை HTML, PDF மற்றும் PS வடிவமைப்புகளில் உள்ளன.
- விம்மிற்கான பயிற்சி மற்றும் அரிச்சுவடி - ஓர் அற்புதமான விம் இற்கான தொடக்கப்பயிற்சி. இதை முதலில் படிக்கவும்.
- விம் குறுநிரல்கள்/உட்செருகுகள்
- மனிதர்களுக்கான விம் (விலையில்லா இ-புத்தகம்) - குளோன் செய்தப்பின் cd என்னும் கட்டளை மூலம் மூல அடைவிற்கு சென்று mkdir dist என்னும் கட்டளையை இடவும், பின் rst/en/Makefile என்னும் கோப்பில் உள்ள SPHINXBUILD என்னும் மாறியிற்கு
sphinx2-build
என்பதற்கு பதிலாகsphinx-build
என மாற்றவும். பின் ./makedist.sh என்னும் கட்டளையை இயக்கவும். PDF ஐ படிக்க ./dist/vimpourleshumains/ என்னுமிடத்திற்கு செல்லவும். - வி மற்றும் விம் உரை திருத்திகளை பற்றி கற்றல், 7 ஆவது பதிப்பு O'Reilly அட்டை பதிப்பு ISBN: 978-0-596-52983-3, இ-புத்தக ISBN: 978-0-596-15935-1
- விம்மின் எதிர்-சாயல்கள் - விம்மோடு ஓட்டத்தை பராமரித்தல் பற்றிய வலைப்பதிவு.
- Vim Tips Wiki - Previously known as Wikia, Vim Tips Wiki is now on Fandom.com.
- Vim: Seven habits of effective text editing - A guide written in the year 2000 that still is relevant today!