<?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 &#8211; Luxing Huang</title>
	<atom:link href="https://luxing.im/tag/vim/feed/" rel="self" type="application/rss+xml" />
	<link>https://luxing.im</link>
	<description>Thoughs and things</description>
	<lastBuildDate>Tue, 29 Apr 2014 22:32:42 +0000</lastBuildDate>
	<language>en-CA</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.7.2</generator>
<site xmlns="com-wordpress:feed-additions:1">58771605</site>	<item>
		<title>Configuration on PS1 files in Vim</title>
		<link>https://luxing.im/configuration-on-ps1-files-in-vim/</link>
					<comments>https://luxing.im/configuration-on-ps1-files-in-vim/#respond</comments>
		
		<dc:creator><![CDATA[Luxing Huang]]></dc:creator>
		<pubDate>Tue, 29 Apr 2014 22:31:20 +0000</pubDate>
				<category><![CDATA[Learning Notes]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[ps1]]></category>
		<category><![CDATA[vim]]></category>
		<category><![CDATA[vimrc]]></category>
		<guid isPermaLink="false">http://blog.luxing.im/?p=375</guid>

					<description><![CDATA[Thank you Lixar for my first ever Co-op placement. Although there are many colleagues like me, love to use Linux/Unix as our main OS, work must be done as what we are expected. Because they choose Azure cloud initially, I have to do development work under Windows. It doesn&#8217;t bother me too much, I still &#8230; <p class="link-more"><a href="https://luxing.im/configuration-on-ps1-files-in-vim/" class="more-link">Continue reading<span class="screen-reader-text"> "Configuration on PS1 files in Vim"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>Thank you <a href="http://www.lixar.com" target="_blank">Lixar</a> for my first ever Co-op placement. Although there are many colleagues like me, love to use Linux/Unix as our main OS, work must be done as what we are expected. Because they choose Azure cloud initially, I have to do development work under Windows.</p>
<p>It doesn&#8217;t bother me too much, I still have my Linux as a guest VM on the second screen for transition. Now I need to study some PowerShell scripting.</p>
<p>Vim doesn&#8217;t support ps1 files for highlighting. So there is a <a href="http://www.vim.org/scripts/script.php?script_id=1327" target="_blank">plugin</a> for that. (Check out its github page for installation)<br />
<span id="more-375"></span><br />
I have linebreaks set up, I honour &#8220;80 chars per line&#8221; rule. I don&#8217;t think the nature of PowerShell honours that, at least not our internal scripts. Still I want to keep linebreaks in my vimrc, but to skip linebreaks for any ps1 files. A little bit of research and documentation lookup, add a line to my vimrc:</p>
<pre>autocmd BufRead,BufNewFile *.ps1    set nolbr</pre>
<p>It works perfectly.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://luxing.im/configuration-on-ps1-files-in-vim/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">375</post-id>	</item>
		<item>
		<title>Changing text encoding with Vim</title>
		<link>https://luxing.im/changing-text-encoding-with-vim/</link>
					<comments>https://luxing.im/changing-text-encoding-with-vim/#respond</comments>
		
		<dc:creator><![CDATA[Luxing Huang]]></dc:creator>
		<pubDate>Fri, 28 Feb 2014 01:33:24 +0000</pubDate>
				<category><![CDATA[Techie Stuff]]></category>
		<category><![CDATA[charset]]></category>
		<category><![CDATA[encoding]]></category>
		<category><![CDATA[iconv]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[vim]]></category>
		<guid isPermaLink="false">http://blog.luxing.im/?p=301</guid>

					<description><![CDATA[A lot of subtitles in Chinese language are encoded with GB2312 or sometimes Code Page 936 (CP936, aka gbk), are generated under Windows. This brings problems in many Linux based multimedia players. Converting using iconv is not that hard, since its command is simple to use: iconv -f gb2312 -t utf8 subtitle.srt -o converted.srt But &#8230; <p class="link-more"><a href="https://luxing.im/changing-text-encoding-with-vim/" class="more-link">Continue reading<span class="screen-reader-text"> "Changing text encoding with Vim"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>A lot of subtitles in Chinese language are encoded with GB2312 or sometimes Code Page 936 (CP936, aka gbk), are generated under Windows. This brings problems in many Linux based multimedia players.<br />
<span id="more-301"></span><br />
Converting using <strong>iconv</strong> is not that hard, since its command is simple to use:</p>
<pre>iconv -f gb2312 -t utf8 subtitle.srt -o converted.srt</pre>
<p>But in many cases, you will find error as such: </p>
<pre>iconv: illegal input sequence at position xxxx.</pre>
<p> To solve this, you can need to change the <strong>gb2312</strong> to some larger encoding set with the same catagory. For example, <strong>gbk</strong> is a super set of gb2312.</p>
<p>If you only know the file&#8217;s encoding but don&#8217;t know its super charset, you can always use vim to convert it.</p>
<pre>vim subtitle.srt</pre>
<p>Edit it with <em>++enc</em> option:</p>
<pre>:e ++enc=gb2312</pre>
<p>Save it with <em>++enc</em> option:</p>
<pre>:w ++enc=utf8 converted.srt</pre>
<p>Related documentation: <a href="http://vimdoc.sourceforge.net/htmldoc/usr_45.html#45.4" target="_blank">http://vimdoc.sourceforge.net/htmldoc/usr_45.html#45.4</a></p>
<p>All done!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://luxing.im/changing-text-encoding-with-vim/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">301</post-id>	</item>
		<item>
		<title>Vim configuration</title>
		<link>https://luxing.im/vim-configuration/</link>
					<comments>https://luxing.im/vim-configuration/#comments</comments>
		
		<dc:creator><![CDATA[Luxing Huang]]></dc:creator>
		<pubDate>Mon, 16 Dec 2013 05:27:43 +0000</pubDate>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[vim]]></category>
		<category><![CDATA[vimrc]]></category>
		<guid isPermaLink="false">http://blog.luxing.im/?p=247</guid>

					<description><![CDATA[This is my VIM configuration, I&#8217;d like to make a note here and remember what I did if I ever encounter a system re-install. See those install notes for installation. The Ultimate Vim Configuration This is the default template of my vimrc, I did have a few modifications, mostly these are related to plugins. http://amix.dk/vim/vimrc.html &#8230; <p class="link-more"><a href="https://luxing.im/vim-configuration/" class="more-link">Continue reading<span class="screen-reader-text"> "Vim configuration"</span></a></p>]]></description>
										<content:encoded><![CDATA[<p>This is my VIM configuration, I&#8217;d like to make a note here and remember what I did if I ever encounter a system re-install.<br />
<span id="more-247"></span></p>
<p>See those install notes for installation.</p>
<h3>The Ultimate Vim Configuration</h3>
<p>This is the default template of my vimrc, I did have a few modifications, mostly these are related to plugins.<br />
<a href="http://amix.dk/vim/vimrc.html" target="_blank">http://amix.dk/vim/vimrc.html</a></p>
<h3>Pathogen</h3>
<p>Simple and cool plugin manager, there is an alternative called <a href="https://github.com/gmarik/vundle" target="_blank">Vundle</a> available.<br />
<a href="https://github.com/tpope/vim-pathogen" target="_blank">https://github.com/tpope/vim-pathogen</a></p>
<h3>nerdtree</h3>
<p>This gives you an IDE function, allowing to browse around your local folder for editing different source codes without doing too much command typing.</p>
<pre>map <F10> :NERDTreeToggle<CR></pre>
<p> is added for key mapping triggers.<br />
<a href="https://github.com/scrooloose/nerdtree" target="_blank">https://github.com/scrooloose/nerdtree</a></p>
<h3>Tag list</h3>
<p>List all of your functions, macros and pre-definitions, and jump to them. Package ctags needs to be installed.<br />
<a href="https://github.com/vim-scripts/taglist.vim" target="_blank">https://github.com/vim-scripts/taglist.vim</a></p>
<h3>Jedi-vim</h3>
<p>An auto-completion plugin for Python, very nice indeed!<br />
<a href="https://github.com/davidhalter/jedi-vim" target="_blank">https://github.com/davidhalter/jedi-vim</a></p>
]]></content:encoded>
					
					<wfw:commentRss>https://luxing.im/vim-configuration/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">247</post-id>	</item>
	</channel>
</rss>
