<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Vim Archives - scmGalaxy</title>
	<atom:link href="https://www.scmgalaxy.com/tutorials/tag/vim/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.scmgalaxy.com/tutorials/tag/vim/</link>
	<description>A Platform for Software Engineers</description>
	<lastBuildDate>Sat, 27 Feb 2021 09:55:35 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1</generator>
	<item>
		<title>VIM custom settings.</title>
		<link>https://www.scmgalaxy.com/tutorials/vim-custom-settings/</link>
					<comments>https://www.scmgalaxy.com/tutorials/vim-custom-settings/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Fri, 08 Dec 2017 05:19:05 +0000</pubDate>
				<category><![CDATA[Shell Script]]></category>
		<category><![CDATA[Vim]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=2229</guid>

					<description><![CDATA[<p>rajeshkumar created the topic: VIM custom settings. Hi, I was required to set my tab to 4 space. I got [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/vim-custom-settings/">VIM custom settings.</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>rajeshkumar created the topic: VIM custom settings.</strong><br />
Hi,</p>
<p>I was required to set my tab to 4 space. I got some inputs and based on google search i found good reference which can used to customize your VIM editor. Please create one .vimrc file and save in your home directory. .vimrc file will contain following info which can be modify depends on your requirement&#8230;.</p>
<p><code>" Michael's standard settings<br />
" Author: Michael Geddes<br />
" Version: 0.1</p>
<p>" Smart tabbing / autoindenting<br />
set undolevels=100<br />
set nocompatible<br />
set autoindent<br />
set smarttab<br />
" Allow backspace to back over lines<br />
set backspace=2<br />
set exrc<br />
set shiftwidth=4<br />
set tabstop=4<br />
set cino=t0<br />
" I like it writing automatically on swapping<br />
set autowrite<br />
set noshowcmd<br />
if exists('&selection')<br />
  set selection=exclusive<br />
endif</p>
<p>if has("gui_running")<br />
    " set the font to use<br />
    set guifont=Courier_New:h10<br />
    " Hide the mouse pointer while typing<br />
    set mousehide<br />
endif</p>
<p>"Special error formats that handles borland make, greps<br />
"Error formats :<br />
"   line = line number<br />
"   file = file name<br />
"   etype = error type ( a single character )<br />
"   enumber = error number<br />
"   column = column number<br />
"   message = error message<br />
"   _ = space</p>
<p>"   file(line)_:_etype [^0-9] enumber:_message<br />
"   [^"] "file" [^0-9] line:_message<br />
"   file(line)_:_message<br />
"   [^ ]_file_line:_message<br />
"   file:line:message<br />
"   etype [^ ]_file_line:_message<br />
"   etype [^:]:__file(line,column):message    = Borland ??<br />
"   file:line:message<br />
"   etype[^_]file_line_column:_message<br />
set efm=%*[^\ ]\ %t%n\ %f\ %l:\ %m,%\\s%#%f(%l)\ :\ %t%*[^0-9]%n:\ %m,%*[^\"]\"%f\"%*[^0-9]%l:\ %m,%\\s%#%f(%l)\ :\ %m,%*[^\ ]\ %f\ %l:\ %m,%f:%l:%m,%t%*[^\ ]\ %f\ %l:\ %m,%t%*[^:]:\ \ %f(%l\\,%c):%m,%f:%l:%m,%t%*[^\ ]\ %f\ %l\ %c:\ %m<br />
" This changes the status bar highlight slightly from the default<br />
" " set highlight=8b,db,es,mb,Mn,nu,rs,ss,tb,vr,ws</p>
<p>"I like things quiet<br />
set visualbell<br />
" Give some room for errors<br />
set cmdheight=2<br />
" always show a status line<br />
au VimEnter * set laststatus=2<br />
set ruler<br />
" Use a viminfo file<br />
set viminfo='20,\"50<br />
"set path=.,d:\wave,d:\wave\include,d:\wave\fdt<br />
set textwidth=80        " always limit the width of text to 80<br />
set backup              " keep a backup file<br />
set backupext=.bak<br />
" Like having history<br />
set history=100</p>
<p>" Map Y do be analog of D<br />
map Y y$<br />
" Toggle paste<br />
map zp :set paste! paste?<CR></p>
<p>" From the vimrc of 'Peppe'</p>
<p>  " So I can get to ,<br />
  noremap g, ,<br />
  " Go to old line + column<br />
  noremap gf gf`"<br />
  noremap <C-^> <C-^>`"</p>
<p>" Switch off search pattern highlighting.<br />
set nohlsearch<br />
"Toggle search pattern hilighting and display the value<br />
if v:version >=600<br />
  map <f7> :nohlsearch<CR><br />
else<br />
  map <f7> :set hlsearch! hlsearch?<CR><br />
endif<br />
imap <f7> <C-O><f7> </p>
<p>"Ctags mapping for <alt n> and <alt p><br />
map <M-n> :cn<cr>z.:cc<CR><br />
map <M-p> :cp<cr>z.:cc<CR><br />
set shellpipe=2>&1\|tee<br />
"set shellpipe=\|grep\ -v\ NOTE:\|tee</p>
<p>" Set nice colors<br />
" background for normal text is light grey<br />
" Text below the last line is darker grey<br />
" Cursor is green<br />
" Constants are not underlined but have a slightly lighter background<br />
"  highlight Normal guibg=grey95<br />
highlight Cursor guibg=Red guifg=NONE<br />
highlight Visual guifg=Sys_HighlightText guibg=Sys_Highlight gui=NONE<br />
"  highlight NonText guibg=grey90<br />
"  highlight Constant gui=NONE guibg=grey95<br />
"  highlight Special gui=NONE guibg=grey95</p>
<p>if has("gui_running")<br />
"if &columns < 90 &#038;&#038; &#038;lines < 32
"   win 90 32 
    au GUIEnter * win 90 32 
"  endif
  " Make external commands work through a pipe instead of a pseudo-tty
  set noguipty
endif
 
" Map control-cr to goto new line without comment leader
imap <C-CR> <ESC>o</p>
<p>" Look at syntax attribute<br />
nmap <F4> :echo synIDattr(synID(line("."), col("."), 1), "name")<CR><br />
nmap <S-F4> :echo synIDattr(synID(line("."), col("."), 0), "name")<CR><br />
" delete the swap file<br />
nmap \\. :echo strpart("Error  Deleted",7*(0==delete(expand("%:p:h")."/.".expand("%:t").".swp")),7)<cr></p>
<p>" delete prev word<br />
imap <C-BS> <c-w></p>
<p>  set joinspaces </p>
<p>" Today<br />
if !exists('usersign')<br />
let usersign=$username<br />
endif<br />
imap <F2> <C-R>=strftime("%d%b%Y")." ".usersign.":"<CR><br />
if has("menu")<br />
  imenu 35.60 &Insert.&Date<tab>F2      <c-r>=strftime("%d%b%Y")." ".usersign.":"<CR><br />
  menu  35.60 &Insert.&Date<tab>F2      "=strftime("%d%b%Y")." ".usersign.":"<CR>p<br />
  imenu  35.60 &Insert.Date\ and\ &Username     <c-r>=strftime("%d%b%Y")<CR><br />
  menu  35.60 &Insert.Date\ and\ &Username      "=strftime("%d%b%Y")<CR>p<br />
endif</p>
<p>set listchars=eol:¶,tab:›…,trail:_<br />
" Enable 'wild menus'<br />
set wildmenu<br />
set showfulltag<br />
set display+=lastline<br />
set printoptions=syntax:y,wrap:y</p>
<p>" Switch on syntax highlighting.<br />
syntax on</code></p>
<p>Regards,<br />
Rajesh Kumar<br />
Twitt me @ <a href="http://twitter.com/RajeshKumarIn">twitter.com/RajeshKumarIn</a></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/vim-custom-settings/">VIM custom settings.</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/vim-custom-settings/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Setting the tab in Vim</title>
		<link>https://www.scmgalaxy.com/tutorials/setting-the-tab-in-vim/</link>
					<comments>https://www.scmgalaxy.com/tutorials/setting-the-tab-in-vim/#respond</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Fri, 08 Dec 2017 04:32:07 +0000</pubDate>
				<category><![CDATA[Shell Script]]></category>
		<category><![CDATA[Vim]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/?p=2199</guid>

					<description><![CDATA[<p>rajeshkumar created the topic: Setting the tab in Vim Setting the tab in Vim $ sudo vim /etc/vim/vimrc Then add [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/setting-the-tab-in-vim/">Setting the tab in Vim</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><strong>rajeshkumar created the topic: Setting the tab in Vim</strong><br />
Setting the tab in Vim</p>
<p>$ sudo vim /etc/vim/vimrc<br />
Then add the following line:<br />
set tabstop=4</p>
<p>Next, save, exit and execute the script<br />
Regards,<br />
Rajesh Kumar<br />
Twitt me @ <a href="http://twitter.com/RajeshKumarIn">twitter.com/RajeshKumarIn</a></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/setting-the-tab-in-vim/">Setting the tab in Vim</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/setting-the-tab-in-vim/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Top 5 Code Editors for the Software Programmers &#124; Best Code Editor &#124; scmGalaxy</title>
		<link>https://www.scmgalaxy.com/tutorials/top-5-code-editors-for-the-software-programmers/</link>
					<comments>https://www.scmgalaxy.com/tutorials/top-5-code-editors-for-the-software-programmers/#comments</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Sat, 18 Mar 2017 18:22:10 +0000</pubDate>
				<category><![CDATA[IDEs and Editor]]></category>
		<category><![CDATA[Atom]]></category>
		<category><![CDATA[Best]]></category>
		<category><![CDATA[Best Code Editor]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Code Editor]]></category>
		<category><![CDATA[Editors]]></category>
		<category><![CDATA[Features]]></category>
		<category><![CDATA[Komodo Edit]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[Notepad++]]></category>
		<category><![CDATA[Software Programmers]]></category>
		<category><![CDATA[Sublime]]></category>
		<category><![CDATA[Top]]></category>
		<category><![CDATA[Top Code Editors]]></category>
		<category><![CDATA[Vim]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2017/03/18/top-5-code-editors-for-the-software-programmers/</guid>

					<description><![CDATA[<p>This is the age of programming and coding and in the last few years software industry changes a lot. We [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/top-5-code-editors-for-the-software-programmers/">Top 5 Code Editors for the Software Programmers | Best Code Editor | scmGalaxy</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<div><img fetchpriority="high" decoding="async" class="aligncenter wp-image-2994 size-full" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/03/top-5-code-editors-for-the-.png" alt="top-5-code-editors" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/03/top-5-code-editors-for-the-.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/03/top-5-code-editors-for-the--300x200.png 300w" sizes="(max-width: 600px) 100vw, 600px" /></div>
<div style="text-align: justify;">This is the age of programming and coding and in the last few years software industry changes a lot. We can see a lot of automation and different kind of tools used by programmers and developers to perform their tasks and projects, and it&#8217;s necessary too  because a right tool can simplify your work environment and same time it improves your productivity. So, today we are going to talk about &#8220;Code Editors&#8221; tools, which play a vital role in programmer&#8217;s workspace.</div>
<div style="text-align: justify;"></div>
<div style="text-align: justify;"><strong>So first, Let&#8217;s see , What is code Editor?</strong></div>
<div style="text-align: justify;"></div>
<div style="text-align: justify;"><strong>The formal definition is:</strong> <strong>“</strong>A code editor is a type of program used for editing plain text files.<strong>”</strong></div>
<div style="text-align: justify;"></div>
<div style="text-align: justify;"><strong>In our language we can say:</strong> A code editor is a program in our systems or computer that allows us to write, create and edit a range of programming languages codes on them very easily and it&#8217;s also assist programmers to avoid some of the common mistakes in coding by providing them instant detailing of the code, which increase their efficiency.</div>
<div style="text-align: justify;"></div>
<div style="text-align: justify;">
<p>So, this is very much important to use good code editors which comes with some common features which are necessary to make best use of it.</p>
</div>
<div style="text-align: justify;"><strong>Let&#8217;s look on to the common features in Code Editor you should look for.</strong></div>
<ul>
<li><strong>User-Friendly — </strong>It should be easy to use and navigate.</li>
</ul>
<ul>
<li><strong>Search &amp; Replace — </strong>This is one feature through which you can easily search words and replace them with few clicks.</li>
</ul>
<ul>
<li><strong>Copy &amp; Paste —</strong>This feature is no doubt one the most important feature because without cut,copy and paste we can not think to even write these days.</li>
</ul>
<ul>
<li style="text-align: justify;"><strong>Syntax highlighting —</strong> Only a programmer knows, how it feels when a single <strong>“;”</strong> (semi-colon) missed in a code of thousand lines results in a failed program execution. So, Code editor should contain syntax highlighting feature, it helps to read and pick up code errors easily.</li>
</ul>
<ul>
<li style="text-align: justify;"><strong>UTF-8 —</strong> Code editors should able to deal with UTF-8 encoded text.</li>
</ul>
<ul>
<li style="text-align: justify;"><strong>Extensions —</strong> When choosing a text editor one should also check plugins availability to the editor. It allows you to use it with additional features.</li>
</ul>
<div style="text-align: justify;"></div>
<div style="text-align: justify;">
<p><strong>Now, comes the real problem</strong></p>
<p>&nbsp;</p>
</div>
<div style="text-align: justify;">There are so many Code editors available but to choose from them can be a challenging task. It requires time, experiment and research to find out the best code editors. To help you out we have done all these things for you and compile a list of top 10 code editors. So without wasting any time let&#8217;s start.</div>
<div style="text-align: justify;"></div>
<div style="text-align: justify;">
<p><strong><br />
1. Notepad++</strong></p>
<p><img decoding="async" class="alignnone wp-image-552 size-full" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/03/notepad-editor.png" alt="notepad++" width="300" height="200" /><strong><br />
</strong></p>
</div>
<div style="text-align: justify;"></div>
<div style="text-align: justify;"><strong>Notepad ++</strong> is an open source code editor which is one of the most popular editor which compatible with windows but can be use on Linux, Unix, Mac or OS with the help of Wine. This application supports large numbers of programming, scripting and markup languages but works best with HTML, CSS, JavaScript and PHP. It is very easy to use and very lightweight application which can manage huge files without any major lags or crashes.</div>
<div style="text-align: justify;"></div>
<div style="text-align: justify;"><strong>It&#8217;s features:-</strong></div>
<ul>
<li style="text-align: justify;">Supports syntax highlighting</li>
<li style="text-align: justify;">Tabbed editing</li>
<li style="text-align: justify;">External Plugins Support</li>
<li style="text-align: justify;">Auto indentation</li>
<li style="text-align: justify;">Auto-completion of words &amp; functions.</li>
<li style="text-align: justify;">Compiler Integration</li>
<li style="text-align: justify;">File Transfer Protocol (FTP) support</li>
<li style="text-align: justify;">Search and Replace</li>
</ul>
<div style="text-align: justify;"></div>
<div style="text-align: justify;"><strong>2.Sublime</strong></div>
<div style="text-align: justify;"><img decoding="async" class="alignnone wp-image-553 size-full" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/03/sublime-editor-1.png" alt="sublime" width="300" height="200" /></div>
<div style="text-align: justify;"><strong>Sublime</strong> is also one of the most popular editor tool. The sublime editor is not available for free but you can use free trial offer. This editor works on Mac, Windows, and Linux operating systems and they have an advanced interface which is really good for server side programming. It is also lightweight but powerful editor which provides IDE-like features along with Python Scripting. This editor can be an alernative for Integrated Development Environment (IDE). This editor also allows you to use it without any complications. Easy to use and navigate.</div>
<div style="text-align: justify;"></div>
<div style="text-align: justify;"><strong>It&#8217;s features</strong></div>
<ul>
<li style="text-align: justify;">Lightning fast project switching</li>
<li style="text-align: justify;">Multiple line selection and editing</li>
<li style="text-align: justify;">Syntax highlighting</li>
<li style="text-align: justify;">Can be completely customized</li>
<li style="text-align: justify;">Programmers friendly Plugins support</li>
<li style="text-align: justify;">Side by side file comparisons</li>
<li style="text-align: justify;">cross platform support</li>
<li style="text-align: justify;">Distraction free mode (Black screen)</li>
</ul>
<div style="text-align: justify;"></div>
<div style="text-align: justify;">
<p><strong>3. Vim</strong></p>
<p><img loading="lazy" decoding="async" class="alignnone wp-image-554 size-full" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/03/vim-editor-1.png" alt="vim" width="300" height="200" /></p>
</div>
<div style="text-align: justify;"></div>
<div style="text-align: justify;"><strong>Vim</strong> is an open source free to use editor which is one of the oldest code editor of the industry. This editor works on windows, Linux, Mac os, Android and in iOS platforms. This editor supports large number of plugins which makes it fully customizable. This is one of the most powerful editor you can use but it demands your mastery due to its overtly techie nature but once you get it, you can find no other better options than this editor.</div>
<div style="text-align: justify;"></div>
<div style="text-align: justify;"><strong>It&#8217;s features</strong></div>
<ul>
<li style="text-align: justify;">Work very well with large files</li>
<li style="text-align: justify;">Supports complete keyboard operations</li>
<li style="text-align: justify;">Supports large numbers of plugins</li>
<li style="text-align: justify;">Useful in a remote development environment using a terminal over SSH</li>
<li style="text-align: justify;">It can be customized to heart’s content using .vimrc dotfile &amp; VimScript</li>
<li style="text-align: justify;">Charityware (Donations go to charities)</li>
</ul>
<div style="text-align: justify;"></div>
<div style="text-align: justify;"><strong>4. Atom</strong></div>
<div style="text-align: justify;"><img loading="lazy" decoding="async" class="alignnone wp-image-555 size-full" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/03/atom-editor.png" alt="atom" width="300" height="200" /></div>
<div style="text-align: justify;"><strong>Atom</strong> is also amongst open source free to use editors which was invented by GitHub. Atom is a quite new in this industry which was introduced as &#8220;hackable text editor for the 21st century&#8221;. It&#8217;s designed very simple but can be easily customize with the help of packages. This one is resemblance of sublime text editor. It&#8217;s work on OSX 10.8 or later, Windows and Linux platforms.</div>
<div style="text-align: justify;"></div>
<div style="text-align: justify;"><strong>It&#8217;s features</strong></div>
<ul>
<li style="text-align: justify;">Very easy to use</li>
<li style="text-align: justify;">Auto-completion</li>
<li style="text-align: justify;">Highly customizable</li>
<li style="text-align: justify;">Offers git control and package management features</li>
<li style="text-align: justify;">Updates on regular basis with new functionalities and bug fixes</li>
<li style="text-align: justify;">Supports Command Palette</li>
<li style="text-align: justify;">Easy to Customise UI</li>
</ul>
<div style="text-align: justify;"></div>
<div style="text-align: justify;">
<p><strong>5. Komodo Edit</strong></p>
<p>&nbsp;</p>
</div>
<div style="text-align: justify;"><img loading="lazy" decoding="async" class="alignnone wp-image-556 size-full" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2017/03/komodo-edit.png" alt="komodo edit" width="300" height="200" /></div>
<div style="text-align: justify;"><strong>Komodo edit</strong> is also amongst one of the powerful editor which is available in open source and free to use that works on Windows, Mac OS X and Linux. Komodo edit supports few programming languages which are HTML5, TCL, XML, JavaScript, Ruby, Python, Perl, CSS3, and PHP. This editor is preferred by advanced programmers , so if you are just starting out than it will take some time to understand it&#8217;s interface and navigations.</div>
<div style="text-align: justify;"></div>
<div style="text-align: justify;"><strong>It&#8217;s features</strong></div>
<ul>
<li style="text-align: justify;">Syntax highlighting</li>
<li style="text-align: justify;">Auto indentation</li>
<li style="text-align: justify;">Code folding</li>
<li style="text-align: justify;">Auto completion</li>
<li style="text-align: justify;">Extension support and macros</li>
<li style="text-align: justify;">Multiple selections</li>
<li style="text-align: justify;">Code snippets</li>
<li style="text-align: justify;">Komodo IDE for Teams (you can upgrade for advance features)</li>
</ul>
<div style="text-align: justify;"></div>
<div style="text-align: justify;">In the end I would just say, the best text editor is the one you work most effectively with. You simply need to discover the editor that gets you there the fastest.</div>
<div style="text-align: justify;"></div>
<div style="text-align: justify;">So, this is our selection of top editors for software programmer, we have tried our best to make this list but, if you used or using any other editors and find it better than the above mentioned list then let us know in the comment box below with it&#8217;s key features.</div>
<div></div>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/top-5-code-editors-for-the-software-programmers/">Top 5 Code Editors for the Software Programmers | Best Code Editor | scmGalaxy</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/top-5-code-editors-for-the-software-programmers/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>VI/VIM editor Commands &#124; VI/VIM editor commands reference &#124; Cheat Sheet</title>
		<link>https://www.scmgalaxy.com/tutorials/vi-vim-editor-commands/</link>
					<comments>https://www.scmgalaxy.com/tutorials/vi-vim-editor-commands/#comments</comments>
		
		<dc:creator><![CDATA[scmgalaxy K]]></dc:creator>
		<pubDate>Mon, 06 Apr 2009 07:46:57 +0000</pubDate>
				<category><![CDATA[IDEs and Editor]]></category>
		<category><![CDATA[All Features commands in VI/VIM editor]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[Editor]]></category>
		<category><![CDATA[Vi]]></category>
		<category><![CDATA[VI and VIM Tutorial]]></category>
		<category><![CDATA[VI/VIM editor]]></category>
		<category><![CDATA[VI/VIM editor Advantages]]></category>
		<category><![CDATA[VI/VIM editor Alignment command]]></category>
		<category><![CDATA[VI/VIM editor Auto-completion command]]></category>
		<category><![CDATA[VI/VIM editor Commands]]></category>
		<category><![CDATA[VI/VIM editor Commands CheatSheet]]></category>
		<category><![CDATA[VI/VIM editor commands guide]]></category>
		<category><![CDATA[VI/VIM editor commands reference]]></category>
		<category><![CDATA[VI/VIM editor commands tutorial]]></category>
		<category><![CDATA[VI/VIM editor Features]]></category>
		<category><![CDATA[VI/VIM editor File editing command]]></category>
		<category><![CDATA[VI/VIM editor File explorer command]]></category>
		<category><![CDATA[VI/VIM editor File inserting command]]></category>
		<category><![CDATA[VI/VIM editor Marks command]]></category>
		<category><![CDATA[VI/VIM editor Read/Write files command]]></category>
		<category><![CDATA[VI/VIM editor Replace command]]></category>
		<category><![CDATA[VI/VIM editor search command]]></category>
		<category><![CDATA[VI/VIM editor Syntax highlighting command]]></category>
		<category><![CDATA[VI/VIM editor Tabs command]]></category>
		<category><![CDATA[VI/VIM editor Text indent command]]></category>
		<category><![CDATA[VI/VIM editor Text inserting command]]></category>
		<category><![CDATA[VI/VIM editor Unix Interaction command]]></category>
		<category><![CDATA[VI/VIM editor Window spliting command]]></category>
		<category><![CDATA[Vim]]></category>
		<category><![CDATA[What is VI-editor]]></category>
		<guid isPermaLink="false">http://www.scmgalaxy.com/tutorials/2009/04/06/vi-vim-editor-commands/</guid>

					<description><![CDATA[<p>what will happen ? &#8220;man ls &#124;col -b &#62; &#8221; will give the text file same as man ls. what [&#8230;]</p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/vi-vim-editor-commands/">VI/VIM editor Commands | VI/VIM editor commands reference | Cheat Sheet</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4018 aligncenter" src="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2009/04/vi-vim-editor-commands.png" alt="vi-vim-editor-commands" width="600" height="400" srcset="https://www.scmgalaxy.com/tutorials/wp-content/uploads/2009/04/vi-vim-editor-commands.png 600w, https://www.scmgalaxy.com/tutorials/wp-content/uploads/2009/04/vi-vim-editor-commands-300x200.png 300w" sizes="auto, (max-width: 600px) 100vw, 600px" /></p>
<ul>
<li><span style="color: #0000ff;"><b>what will happen ?</b></span></li>
</ul>
<p>&#8220;man ls |col -b &gt; &#8221; will give the text file same as man ls.</p>
<ul>
<li><span style="color: #0000ff;"><b>what is VI-editor ?</b></span></li>
</ul>
<p>While in vi you can run AIX commands without exiting the editing session. The! creates a<br />
shell to execute the command that follows.<br />
1. :!ls will create a shell<br />
2. All files in the current directory are listed. Press return to exit the shell and return to the<br />
vi session or&#8230;<br />
3. While still in command mode, issue the :r snacks command<br />
4. The contents of snacks, in this case, are read into the vi file. By default, it will appear<br />
after the current line.<br />
If you need to run a series of commands without returning to vi after the first command is<br />
executed, enter :sh. When you have run all the commands, press to exit the shell<br />
and return to vi.</p>
<ul>
<li><span style="color: #0000ff;"><b>VI Options:-</b></span></li>
</ul>
<p>vi has many modes of operation. Some of these will affect the way text is presented, while<br />
others will make editing easier for novice users.<br />
:set all display all settings<br />
:set display settings different than the default<br />
:set ai sets autoindent on<br />
:set noai turns autoindent mode off<br />
:set nu enables line numbers<br />
:set nonu turns line numbers off<br />
:set list displays non-printable characters<br />
:set nolist hides non-printable characters<br />
:set showmode shows the current mode of operation<br />
:set noshowmode hides mode of operation<br />
:set ts=4 sets tabs to 4-character jumps<br />
:set ic ignores case sensitivity<br />
:set noic case sensitive</p>
<ul>
<li><span style="color: #0000ff;"><b> Search</b></span></li>
</ul>
<p>/word     Search “word” from top to bottom<br />
?word     Search “word” from bottom to top<br />
/jo[ha]n     Search “john” or “joan”<br />
/\&lt; the     Search “the”, “theatre” or “then”<br />
/the\&gt;     Search “the” or “breathe”<br />
/\     Search “the”<br />
/\     Search all words of 4 letters<br />
/\/     Search “fred” but not “alfred” or “frederick”<br />
/fred\|joe     Search “fred” or “joe”<br />
/\     Search exactly 4 digits<br />
/^\n\{3}     Find 3 empty lines<br />
:bufdo /searchstr/     Search in all open files</p>
<ul>
<li><span style="color: #0000ff;"><b>Replace</b></span></li>
</ul>
<p>:%s/old/new/g     Replace all occurences of “old” by “new” in file<br />
:%s/old/new/gw     Replace all occurences with confirmation<br />
:2,35s/old/new/g     Replace all occurences between lines 2 and 35<br />
:5,$s/old/new/g     Replace all occurences from line 5 to EOF<br />
:%s/^/hello/g     Replace the begining of each line by “hello”<br />
:%s/$/Harry/g     Replace the end of each line by “Harry”<br />
:%s/onward/forward/gi     Replace “onward” by “forward” , case unsensitive<br />
:%s/ *$//g     Delete all white spaces<br />
:g/string/d     Delete all lines containing “string”<br />
:v/string/d     Delete all lines containing which didn&#8217;t contain “string”<br />
:s/Bill/Steve/     Replace the first occurence of “Bill” by “Steve” in current line<br />
:s/Bill/Steve/g     Replace “Bill” by “Steve” in current line<br />
:%s/Bill/Steve/g     Replace “Bill” by “Steve” in all the file<br />
:%s/\r//g     Delete DOS carriage returns (^M)<br />
:%s/\r/\r/g     Transform DOS carriage returns in returns<br />
:%s#]\+&gt;##g     Delete HTML tags but keeps text<br />
:%s/^\(.*\)\n\1$/\1/     Delete lines which appears twice<br />
Ctrl+a     Increment number under the cursor<br />
Ctrl+x     Decrement number under cursor<br />
ggVGg?     Change text to Rot13</p>
<p>&nbsp;</p>
<ul>
<li><span style="color: #0000ff;"><b>Case</b></span></li>
</ul>
<p>Vu     Lowercase line<br />
VU     Uppercase line<br />
g~~     Invert case<br />
vEU     Switch word to uppercase<br />
vE~     Modify word case<br />
ggguG     Set all text to lowercase<br />
:set ignorecase     Ignore case in searches<br />
:set smartcase     Ignore case in searches excepted if an uppercase letter is used<br />
:%s/\&lt;./\u&amp;/g     Sets first letter of each word to uppercase<br />
:%s/\&lt;./\l&amp;/g     Sets first letter of each word to lowercase<br />
:%s/.*/\u&amp;     Sets first letter of each line to uppercase<br />
:%s/.*/\l&amp;     Sets first letter of each line to lowercase</p>
<ul>
<li><span style="color: #0000ff;"><b>Read/Write files</b></span></li>
</ul>
<p>:1,10 w outfile     Saves lines 1 to 10 in outfile<br />
:1,10 w &gt;&gt; outfile     Appends lines 1 to 10 to outfile<br />
:r infile     Insert the content of infile<br />
:23r infile     Insert the content of infile under line 23</p>
<ul>
<li><span style="color: #0000ff;"><b>File explorer</b></span></li>
</ul>
<p>:e .     Open integrated file explorer<br />
:Sex     Split window and open integrated file explorer<br />
:browse e     Graphical file explorer<br />
:ls     List buffers<br />
:cd ..     Move to parent directory<br />
:args     List files<br />
:args *.php     Open file list<br />
:grep expression *.php     Returns a list of .php files contening expression<br />
gf     Open file name under cursor</p>
<ul>
<li><span style="color: #0000ff;"><b>Interact with Unix</b></span></li>
</ul>
<p>:!pwd     Execute the “pwd” unix command, then returns to Vi<br />
!!pwd     Execute the “pwd” unix command and insert output in file<br />
:sh     Temporary returns to Unix<br />
$exit     Retourns to Vi</p>
<ul>
<li><span style="color: #0000ff;"><b>Alignment</b></span></li>
</ul>
<p>:%!fmt     Align all lines<br />
!}fmt     Align all lines at the current position<br />
5!!fmt     Align the next 5 lines</p>
<ul>
<li><span style="color: #0000ff;"><b>Tabs</b></span></li>
</ul>
<p>:tabnew     Creates a new tab<br />
gt     Show next tab<br />
:tabfirst     Show first tab<br />
:tablast     Show last tab<br />
:tabm n(position)     Rearrange tabs<br />
:tabdo %s/foo/bar/g     Execute a command in all tabs<br />
:tab ball     Puts all open files in tabs</p>
<ul>
<li><span style="color: #0000ff;"><b>Window spliting</b></span></li>
</ul>
<p>:e filename     Edit filename in current window<br />
:split filename     Split the window and open filename<br />
ctrl-w up arrow     Puts cursor in top window<br />
ctrl-w ctrl-w     Puts cursor in next window<br />
ctrl-w_     Maximise current window<br />
ctrl-w=     Gives the same size to all windows<br />
10 ctrl-w+     Add 10 lines to current window<br />
:vsplit file     Split window vertically<br />
:sview file     Same as :split in readonly mode<br />
:hide     Close current window<br />
:only     Close all windows, excepted current<br />
:b 2     Open #2 in this window</p>
<ul>
<li><span style="color: #0000ff;"><b>Auto-completion</b></span></li>
</ul>
<p>Ctrl+n Ctrl+p (in insert mode)     Complete word<br />
Ctrl+x Ctrl+l     Complete line<br />
:set dictionary=dict     Define dict as a dictionnary<br />
Ctrl+x Ctrl+k     Complete with dictionnary</p>
<ul>
<li><span style="color: #0000ff;"><b>Marks</b></span></li>
</ul>
<p>mk     Marks current position as k<br />
‘k     Moves cursor to mark k<br />
d’k     Delete all until mark k<br />
Abbreviations<br />
:ab pr printf(&#8220;This is a Demo Ver \n&#8221;);    Define pr as abbreviation of printf(&#8220;This is a Demo Ver \n&#8221;);</p>
<ul>
<li><span style="color: #0000ff;"><b>Text indent</b></span></li>
</ul>
<p>:set autoindent     Turn on auto-indent<br />
:set smartindent     Turn on intelligent auto-indent<br />
:set shiftwidth=4     Defines 4 spaces as indent size<br />
ctrl-t, ctrl-d     Indent/un-indent in insert mode<br />
&gt;&gt;     Indent<br />
&lt;&lt;     Un-indent</p>
<ul>
<li><span style="color: #0000ff;"><b>Syntax highlighting</b></span></li>
</ul>
<p>:syntax on     Turn on syntax highlighting<br />
:syntax off     Turn off syntax highlighting<br />
:set syntax=perl     Force syntax highlighting</p>
<ul>
<li><span style="color: #0000ff;"><b>How to Exit</b></span></li>
</ul>
<p>:q[uit]     Quit Vim. This fails when changes have been made.<br />
:q[uit]!     Quit without writing.<br />
:cq[uit]     Quit always, without writing.<br />
:wq     Write the current file and exit.<br />
:wq!     Write the current file and exit always.<br />
:wq {file}     Write to {file}. Exit if not editing the last<br />
:wq! {file}     Write to {file} and exit always.<br />
:[range]wq[!]     [file] Same as above, but only write the lines in [range].<br />
ZZ     Write current file, if modified, and exit.<br />
ZQ     Quit current file and exit (same as &#8220;:q!&#8221;).</p>
<ul>
<li><span style="color: #0000ff;"><b>Editing a File</b></span></li>
</ul>
<p>:e[dit]     Edit the current file. This is useful to re-edit the current file, when it has been changed outside                 of Vim.<br />
:e[dit]!     Edit the current file always. Discard any changes to the current buffer. This is useful if you want                 to start all over again.<br />
:e[dit] {file}     Edit {file}.<br />
:e[dit]! {file}     Edit {file} always. Discard any changes to the current buffer.<br />
gf     Edit the file whose name is under or after the cursor. Mnemonic: &#8220;goto file&#8221;.</p>
<ul>
<li><span style="color: #0000ff;"><b>Inserting Text</b></span></li>
</ul>
<p>a     Append text after the cursor [count] times.<br />
A     Append text at the end of the line [count] times.<br />
i     Insert text before the cursor [count] times.<br />
I     Insert text before the first non-blank in the line [count] times.<br />
gI     Insert text in column 1 [count] times.<br />
o     Begin a new line below the cursor and insert text, repeat [count] times.<br />
O     Begin a new line above the cursor and insert text, repeat [count] times.</p>
<ul>
<li><span style="color: #0000ff;"><b>Inserting a file</b></span></li>
</ul>
<p>:r[ead] [name]     Insert the file [name] below the cursor.<br />
:r[ead] !{cmd}     Execute {cmd} and insert its standard output below the cursor.<br />
<del> </del></p>
<p>The post <a href="https://www.scmgalaxy.com/tutorials/vi-vim-editor-commands/">VI/VIM editor Commands | VI/VIM editor commands reference | Cheat Sheet</a> appeared first on <a href="https://www.scmgalaxy.com/tutorials">scmGalaxy</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.scmgalaxy.com/tutorials/vi-vim-editor-commands/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
