<?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>GCCFeli.cn &#187; vimrc</title> <atom:link href="http://gccfeli.cn/tag/vimrc/feed" rel="self" type="application/rss+xml" /><link>http://gccfeli.cn</link> <description></description> <lastBuildDate>Thu, 14 Jul 2011 08:18:00 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.1</generator> <atom:link rel='hub' href='http://gccfeli.cn/?pushpress=hub'/> <item><title>我的vimrc-windows</title><link>http://gccfeli.cn/2009/09/vimrc-windows.html</link> <comments>http://gccfeli.cn/2009/09/vimrc-windows.html#comments</comments> <pubDate>Thu, 10 Sep 2009 16:08:42 +0000</pubDate> <dc:creator>Felicia</dc:creator> <category><![CDATA[心情日记]]></category> <category><![CDATA[GVIM]]></category> <category><![CDATA[vimrc]]></category><guid
isPermaLink="false">http://gccfeli.cn/?p=759</guid> <description><![CDATA[<div
class="hl-wrapper"><div
class="hl-title">&#19979;&#36733;: <a
href="http://gccfeli.cn/wp-content/plugins/coolcode/coolcode.php?p=759&#38;download=vimrc">vimrc</a></div><div
class="hl-surround"><div
class="hl-main">source $VIMRUNTIME/mswin.vim<br
/>behave mswin<br
/>inoremap &#60;C-D&#62; &#60;C-O&#62;dd<br
/>map &#60;F3&#62; 0i//&#60;C-C&#62;<br
/>inoremap &#60;F3&#62; /**/&#60;left&#62;&#60;left&#62;<br
/>map &#60;F4&#62; ^xx<br
/>inoremap &#60;CR&#62; &#60;CR&#62;&#60;left&#62;&#60;right&#62;<br
/>nnoremap &#60;o&#62; &#60;o&#62;&#60;left&#62;&#60;right&#62;<br
/>nnoremap &#60;O&#62; &#60;O&#62;&#60;left&#62;&#60;right&#62;<br
/>inoremap &#60;c-]&#62; {&#60;cr&#62;}&#60;c-o&#62;O&#60;left&#62;&#60;right&#62;<br
/>noremap &#60;F6&#62; =a{<br
/>syn on<br
/>colo oceandeep<br
/>se ru nu<br
/>set ts=4<br
/>set sw=4<br
/>set cin<br
/>au FileType cpp,c se cin noswf<br
/>set expandtab<br
/>set smarttab<br
/>autocmd BufEnter * lcd %:p:h<br
/>set gfn=Courier\ New\ 10<br
/>set nowrap<br
/>set ww=&#60;,&#62;,[,]<br
/>set lines=40 columns=100<br
/>set go=<br
/>map &#60;c-t&#62; :tabnew&#60;CR&#62;<br
/>map &#60;tab&#62; :tabn&#60;CR&#62;<br
/>map &#60;c-w&#62; :close&#60;cr&#62;<br
/>map &#60;F9&#62; :call CR()&#60;CR&#62;&#60;space&#62;<br
/>func CR()<br
/>exec &#34;update&#34;<br
/>exec &#34;!start cmd /c g++ %&#60;.cpp -Wall -o %&#60; &#38; pause &#38; %&#60; &#60; %&#60;.in &#38; pause&#34;<br
/>endfunc<br
/>map &#60;F10&#62; :call CR2()&#60;CR&#62;&#60;space&#62;<br
/>func CR2()<br
/>exec &#34;update&#34;<br
/>exec &#34;!start cmd /c g++ %&#60;.cpp -Wall -o %&#60;.exe &#38; pause &#38; %&#60; &#38; pause&#34;<br
/>endfunc<br
/>map &#60;F5&#62; :call SetTitle()&#60;CR&#62;GkkkA<br
/>func SetTitle()<br
/>let l = 0<br
/>let l = l + 1 &#124; call setline(l, &#34;/**********************************************************************&#34;)<br
/>let l = l + 1 &#124; call setline(l, &#34;Author: Felicia&#34;)<br
/>let l = l + 1 &#124; call setline(l, &#34;Created Time:&#160; &#34;.strftime(&#34;%c&#34;))<br
/>let l = l + 1 &#124; call setline(l, &#34;File Name: &#34;.expand(&#34;%&#34;))<br
/>let l = l + 1 &#124; call setline(l, &#34;Description: &#34;)<br
/>let l = l + 1 &#124; call setline(l, &#34;**********************************************************************/&#34;)<br
/>let l = l + 1 &#124; call setline(l, &#34;#include &#60;cstdio&#62;&#34;)<br
/>let l = l + 1 &#124; call setline(l, &#34;#include &#60;cstring&#62;&#34;)<br
/>let l = l + 1 &#124; call setline(l, &#34;#include &#60;cstdlib&#62;&#34;)<br
/>let l = l + 1 &#124; call setline(l, &#34;#include &#60;algorithm&#62;&#34;)<br
/>let l = l + 1 &#124; call setline(l, &#34;#include &#60;vector&#62;&#34;)<br
/>let l = l + 1 &#124; call setline(l, &#34;&#34;)<br
/>let l = l + 1 &#124; call setline(l, &#34;using namespace std;&#34;)<br
/>let l = l + 1 &#124; call setline(l, &#34;&#34;)<br
/>let l = l + 1 &#124; call setline(l, &#34;typedef long long int64;&#34;)<br
/>let l = l + 1 &#124; call setline(l, &#34;const int maxint = 0x7FFFFFFF;&#34;)<br
/>let l = l + 1 &#124; call setline(l, &#34;const int64 maxint64 = 0x7FFFFFFFFFFFFFFFLL;&#34;)<br
/>let l = l + 1 &#124; call setline(l, &#34;&#34;)<br
/>let l = l + 1 &#124; call setline(l, &#34;int main() {&#34;)<br
/>let l = l + 1 &#124; call setline(l, &#34;&#34;)<br
/>let l = l + 1 &#124; call setline(l, &#34;&#160; &#160; return 0;&#34;)<br
/>let l = l + 1 &#124; call setline(l, &#34;}&#34;)<br
/>let l = l + 1 &#124; call setline(l, &#34;&#34;)<br
/>endfunc<br
/>autocmd BufWritePre,FileWritePre *.cpp&#160; &#160;call LastMod()<br
/>fun LastMod()<br
/>&#160;&#160; &#160;let L = line(&#34;$&#34;)<br
/>&#160;&#160; &#160;let original_view = winsaveview()<br
/>&#160;&#160; &#160;if L &#62; 20<br
/>&#160;&#160; &#160; &#160; &#160;let L = 20<br
/>&#160;&#160; &#160;endif<br
/>&#160;&#160; &#160;exe &#34;1,&#34; . L . &#34;g/Modified Time: /s/Modified Time: .*/Modified Time: &#34; .<br
/>&#160;&#160; &#160; &#160; &#160;\ strftime(&#34;%c&#34;)<br
/>&#160;&#160; &#160;call winrestview(original_view)<br
/>endfun<br
/><br
/>set foldenable<br
/>set foldmethod=marker<br
/>&#34;marker<br
/>noremap &#60;space&#62; @=((foldclosed(line('.')) &#60; 0) ? 'zc' : 'zo')&#60;CR&#62;<br
/>&#34;inoremap ( ()&#60;left&#62;<br
/>&#34;inoremap ) &#60;c-r&#62;=ClosePair(')')&#60;CR&#62;<br
/>&#34;inoremap { {}&#60;left&#62;<br
/>&#34;inoremap } &#60;c-r&#62;=ClosePair('}')&#60;CR&#62;<br
/>&#34;inoremap [ []&#60;left&#62;<br
/>&#34;inoremap ] &#60;c-r&#62;=ClosePair(']')&#60;CR&#62;<br
/>function ClosePair(char)<br
/>if getline('.')[col('.') - 1] == a:char<br
/>return &#34;\&#60;Right&#62;&#34;<br
/>else<br
/>return a:char<br
/>endif<br
/>endf<br
/>map&#60;F4&#62; :call AddComment()&#60;cr&#62;<br
/>func AddComment()<br
/>&#160;&#160; &#160;if (getline('.')[0] == '/')<br
/>&#160;&#160; &#160; &#160; &#160;normal ^xx<br
/>&#160;&#160; &#160;else<br
/>&#160;&#160; &#160; &#160; &#160;normal 0i//<br
/>&#160;&#160; &#160;endif<br
/>endfunc<br
/><br
/>au BufNewFile,BufRead *.fg setfile c<br
/>cd e:\workspace</div></div> <span
class="readmore"><a
href="http://gccfeli.cn/2009/09/vimrc-windows.html" title="我的vimrc-windows">阅读全文（381字）</a></span>]]></description> <content:encoded><![CDATA[<div
class="hl-wrapper"><div
class="hl-title">&#19979;&#36733;: <a
href="http://gccfeli.cn/wp-content/plugins/coolcode/coolcode.php?p=759&amp;download=vimrc">vimrc</a></div><div
class="hl-surround"><div
class="hl-main">source $VIMRUNTIME/mswin.vim<br
/>behave mswin<br
/>inoremap &lt;C-D&gt; &lt;C-O&gt;dd<br
/>map &lt;F3&gt; 0i//&lt;C-C&gt;<br
/>inoremap &lt;F3&gt; /**/&lt;left&gt;&lt;left&gt;<br
/>map &lt;F4&gt; ^xx<br
/>inoremap &lt;CR&gt; &lt;CR&gt;&lt;left&gt;&lt;right&gt;<br
/>nnoremap &lt;o&gt; &lt;o&gt;&lt;left&gt;&lt;right&gt;<br
/>nnoremap &lt;O&gt; &lt;O&gt;&lt;left&gt;&lt;right&gt;<br
/>inoremap &lt;c-]&gt; {&lt;cr&gt;}&lt;c-o&gt;O&lt;left&gt;&lt;right&gt;<br
/>noremap &lt;F6&gt; =a{<br
/>syn on<br
/>colo oceandeep<br
/>se ru nu<br
/>set ts=4<br
/>set sw=4<br
/>set cin<br
/>au FileType cpp,c se cin noswf<br
/>set expandtab<br
/>set smarttab<br
/>autocmd BufEnter * lcd %:p:h<br
/>set gfn=Courier\ New\ 10<br
/>set nowrap<br
/>set ww=&lt;,&gt;,[,]<br
/>set lines=40 columns=100<br
/>set go=<br
/>map &lt;c-t&gt; :tabnew&lt;CR&gt;<br
/>map &lt;tab&gt; :tabn&lt;CR&gt;<br
/>map &lt;c-w&gt; :close&lt;cr&gt;<br
/>map &lt;F9&gt; :call CR()&lt;CR&gt;&lt;space&gt;<br
/>func CR()<br
/>exec &quot;update&quot;<br
/>exec &quot;!start cmd /c g++ %&lt;.cpp -Wall -o %&lt; &amp; pause &amp; %&lt; &lt; %&lt;.in &amp; pause&quot;<br
/>endfunc<br
/>map &lt;F10&gt; :call CR2()&lt;CR&gt;&lt;space&gt;<br
/>func CR2()<br
/>exec &quot;update&quot;<br
/>exec &quot;!start cmd /c g++ %&lt;.cpp -Wall -o %&lt;.exe &amp; pause &amp; %&lt; &amp; pause&quot;<br
/>endfunc<br
/>map &lt;F5&gt; :call SetTitle()&lt;CR&gt;GkkkA<br
/>func SetTitle()<br
/>let l = 0<br
/>let l = l + 1 | call setline(l, &quot;/**********************************************************************&quot;)<br
/>let l = l + 1 | call setline(l, &quot;Author: Felicia&quot;)<br
/>let l = l + 1 | call setline(l, &quot;Created Time:&nbsp; &quot;.strftime(&quot;%c&quot;))<br
/>let l = l + 1 | call setline(l, &quot;File Name: &quot;.expand(&quot;%&quot;))<br
/>let l = l + 1 | call setline(l, &quot;Description: &quot;)<br
/>let l = l + 1 | call setline(l, &quot;**********************************************************************/&quot;)<br
/>let l = l + 1 | call setline(l, &quot;#include &lt;cstdio&gt;&quot;)<br
/>let l = l + 1 | call setline(l, &quot;#include &lt;cstring&gt;&quot;)<br
/>let l = l + 1 | call setline(l, &quot;#include &lt;cstdlib&gt;&quot;)<br
/>let l = l + 1 | call setline(l, &quot;#include &lt;algorithm&gt;&quot;)<br
/>let l = l + 1 | call setline(l, &quot;#include &lt;vector&gt;&quot;)<br
/>let l = l + 1 | call setline(l, &quot;&quot;)<br
/>let l = l + 1 | call setline(l, &quot;using namespace std;&quot;)<br
/>let l = l + 1 | call setline(l, &quot;&quot;)<br
/>let l = l + 1 | call setline(l, &quot;typedef long long int64;&quot;)<br
/>let l = l + 1 | call setline(l, &quot;const int maxint = 0x7FFFFFFF;&quot;)<br
/>let l = l + 1 | call setline(l, &quot;const int64 maxint64 = 0x7FFFFFFFFFFFFFFFLL;&quot;)<br
/>let l = l + 1 | call setline(l, &quot;&quot;)<br
/>let l = l + 1 | call setline(l, &quot;int main() {&quot;)<br
/>let l = l + 1 | call setline(l, &quot;&quot;)<br
/>let l = l + 1 | call setline(l, &quot;&nbsp; &nbsp; return 0;&quot;)<br
/>let l = l + 1 | call setline(l, &quot;}&quot;)<br
/>let l = l + 1 | call setline(l, &quot;&quot;)<br
/>endfunc<br
/>autocmd BufWritePre,FileWritePre *.cpp&nbsp; &nbsp;call LastMod()<br
/>fun LastMod()<br
/>&nbsp;&nbsp; &nbsp;let L = line(&quot;$&quot;)<br
/>&nbsp;&nbsp; &nbsp;let original_view = winsaveview()<br
/>&nbsp;&nbsp; &nbsp;if L &gt; 20<br
/>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;let L = 20<br
/>&nbsp;&nbsp; &nbsp;endif<br
/>&nbsp;&nbsp; &nbsp;exe &quot;1,&quot; . L . &quot;g/Modified Time: /s/Modified Time: .*/Modified Time: &quot; .<br
/>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;\ strftime(&quot;%c&quot;)<br
/>&nbsp;&nbsp; &nbsp;call winrestview(original_view)<br
/>endfun<br
/><br
/>set foldenable<br
/>set foldmethod=marker<br
/>&quot;marker<br
/>noremap &lt;space&gt; @=((foldclosed(line('.')) &lt; 0) ? 'zc' : 'zo')&lt;CR&gt;<br
/>&quot;inoremap ( ()&lt;left&gt;<br
/>&quot;inoremap ) &lt;c-r&gt;=ClosePair(')')&lt;CR&gt;<br
/>&quot;inoremap { {}&lt;left&gt;<br
/>&quot;inoremap } &lt;c-r&gt;=ClosePair('}')&lt;CR&gt;<br
/>&quot;inoremap [ []&lt;left&gt;<br
/>&quot;inoremap ] &lt;c-r&gt;=ClosePair(']')&lt;CR&gt;<br
/>function ClosePair(char)<br
/>if getline('.')[col('.') - 1] == a:char<br
/>return &quot;\&lt;Right&gt;&quot;<br
/>else<br
/>return a:char<br
/>endif<br
/>endf<br
/>map&lt;F4&gt; :call AddComment()&lt;cr&gt;<br
/>func AddComment()<br
/>&nbsp;&nbsp; &nbsp;if (getline('.')[0] == '/')<br
/>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;normal ^xx<br
/>&nbsp;&nbsp; &nbsp;else<br
/>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;normal 0i//<br
/>&nbsp;&nbsp; &nbsp;endif<br
/>endfunc<br
/><br
/>au BufNewFile,BufRead *.fg setfile c<br
/>cd e:\workspace</div></div></div> ]]></content:encoded> <wfw:commentRss>http://gccfeli.cn/2009/09/vimrc-windows.html/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>我的vimrc</title><link>http://gccfeli.cn/2008/05/my-vimrc.html</link> <comments>http://gccfeli.cn/2008/05/my-vimrc.html#comments</comments> <pubDate>Thu, 22 May 2008 04:10:57 +0000</pubDate> <dc:creator>Felicia</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[GVIM]]></category> <category><![CDATA[vimrc]]></category><guid
isPermaLink="false">http://www.gccfeli.cn/archives/155.html</guid> <description><![CDATA[<p>最近改的vimrc，记录在这里备用<br
/></p><div
class="hl-wrapper"> <span
class="readmore"><a
href="http://gccfeli.cn/2008/05/my-vimrc.html" title="我的vimrc">阅读全文（2549字）</a></span>]]></description> <content:encoded><![CDATA[<p>最近改的vimrc，记录在这里备用<br
/> <span
id="more-155"></span></p><div
class="hl-wrapper"><div
class="hl-title">&#19979;&#36733;: <a
href="http://gccfeli.cn/wp-content/plugins/coolcode/coolcode.php?p=155&amp;download=vimrc">vimrc</a></div><div
class="hl-surround"><div
class="hl-main">&quot; disable VI compatible<br
/>set nocompatible<br
/><br
/>&quot; set tab and indent<br
/>set tabstop=4<br
/>set softtabstop=4<br
/>set shiftwidth=4<br
/>set expandtab<br
/>set cindent<br
/>set cino=g0<br
/>set comments=s1:/*,mb:*,ex:*/<br
/><br
/>&quot; set GUI<br
/>color desert<br
/>syntax on<br
/>set mouse=a<br
/>set hlsearch<br
/>set wildmenu<br
/>set cursorline<br
/>set number<br
/>set scrolloff=5<br
/>set sidescrolloff=10<br
/>set nowrap<br
/>set ignorecase<br
/>set gfn=Courier\ 10\ Pitch\ 12<br
/><br
/>&quot; disable menus<br
/>set go=<br
/><br
/>&quot; disable startup message<br
/>set shortmess+=I<br
/><br
/>&quot; set<br
/>set magic<br
/>set timeoutlen=350<br
/><br
/>&quot; status line<br
/>set laststatus=2<br
/>set statusline=\ %F%m%r%h\ %w\ \ %r%{getcwd()}%h\ \ \ Line:\ %l/%L:%c<br
/><br
/>&quot; set window position and size<br
/>winpos 120 100<br
/>set lines=35<br
/>set columns=100<br
/><br
/>set backspace=indent,eol,start<br
/>set nobackup&nbsp; &nbsp; &quot; do not keep a backup file, use versions instead<br
/>set history=50&nbsp; &nbsp; &quot; keep 50 lines of command line history<br
/>set ruler&nbsp; &nbsp; &quot; show the cursor position all the time<br
/>set showcmd&nbsp; &nbsp; &quot; display incomplete commands<br
/>set incsearch&nbsp; &nbsp; &quot; do incremental searching<br
/>set encoding=utf-8<br
/>set fileencodings=utf-8,gb2312,gb18030,gbk,ucs-bom,cp936,latin1 <br
/>set termencoding=utf-8<br
/>set printoptions=syntax:n,number:y,portrait:y<br
/><br
/>set autoread<br
/>set helplang=cn<br
/><br
/>set ww=&lt;,&gt;,[,]<br
/><br
/><br
/>&quot; key maps<br
/><br
/>inoremap &lt;C-D&gt; &lt;C-O&gt;dd<br
/>inoremap &lt;CR&gt; &lt;CR&gt;&lt;left&gt;&lt;right&gt;<br
/>map o o&lt;left&gt;&lt;right&gt;<br
/>map O O&lt;left&gt;&lt;right&gt;<br
/>inoremap &lt;c-]&gt; {&lt;cr&gt;}&lt;c-o&gt;O&lt;left&gt;&lt;right&gt;<br
/>noremap &lt;F6&gt; =a{<br
/><br
/>let mapleader=&quot;,&quot;<br
/><br
/>&quot; for select, cut, paste<br
/>map &lt;leader&gt;a ggVG<br
/>map &lt;leader&gt;c &quot;+c<br
/>map &lt;leader&gt;y &quot;+y<br
/>map &lt;leader&gt;p &quot;+p<br
/><br
/>&quot; for tabs<br
/>map &lt;C-T&gt; :tabnew&lt;CR&gt;<br
/>imap &lt;C-T&gt; &lt;Esc&gt;&lt;C-T&gt;<br
/>map &lt;C-F4&gt; :close&lt;cr&gt;<br
/>imap &lt;C-F4&gt; &lt;Esc&gt;&lt;C-F4&gt;<br
/>map &lt;C-P&gt; :tabp&lt;cr&gt;<br
/>imap &lt;C-P&gt; &lt;Esc&gt;&lt;C-P&gt;<br
/>map &lt;C-N&gt; :tabn&lt;cr&gt;<br
/>imap &lt;C-N&gt; &lt;Esc&gt;&lt;C-N&gt;<br
/><br
/><br
/>&quot; ,w for save<br
/>nmap &lt;leader&gt;w :w!&lt;cr&gt;<br
/>&quot; ,q for quit<br
/>nmap &lt;leader&gt;q :q&lt;cr&gt;<br
/><br
/>&quot; F3 to format code<br
/>&quot;if &amp;filetype == 'cpp' <br
/>map &lt;silent&gt;&lt;F3&gt; :w&lt;cr&gt;:!astyle --style=kr %&lt;cr&gt;:n %&lt;cr&gt;<br
/>imap &lt;silent&gt;&lt;F3&gt; &lt;Esc&gt;&lt;F3&gt;<br
/>&quot;endif<br
/><br
/>&quot; F5 to insert template<br
/>map &lt;F5&gt; &lt;Esc&gt;ggdG:call Template()&lt;cr&gt;24Go<br
/>imap &lt;F5&gt; &lt;Esc&gt;&lt;F5&gt;<br
/>func Template()<br
/>let l=0<br
/>let l=l+1 | call setline(l, &quot;\/**&quot;)<br
/>let l=l+1 | call setline(l, &quot; * File Name: &quot;.expand(&quot;%&quot;)) <br
/>let l=l+1 | call setline(l, &quot; * Created Time:&nbsp; &quot;.strftime(&quot;%c&quot;)) <br
/>let l=l+1 | call setline(l, &quot; * Author: Felicia&quot;)<br
/>let l=l+1 | call setline(l, &quot; * Description: &quot;)<br
/>let l=l+1 | call setline(l, &quot; */&quot;)<br
/>let l=l+1 | call setline(l, &quot;#include &lt;cstdio&gt;&quot;)<br
/>let l=l+1 | call setline(l, &quot;#include &lt;cstring&gt;&quot;)<br
/>let l=l+1 | call setline(l, &quot;#include &lt;cmath&gt;&quot;)<br
/>let l=l+1 | call setline(l, &quot;#include &lt;cstdlib&gt;&quot;)<br
/>let l=l+1 | call setline(l, &quot;#include &lt;algorithm&gt;&quot;)<br
/>let l=l+1 | call setline(l, &quot;#include &lt;vector&gt;&quot;)<br
/>let l=l+1 | call setline(l, &quot;#include &lt;set&gt;&quot;)<br
/>let l=l+1 | call setline(l, &quot;#include &lt;map&gt;&quot;)<br
/>let l=l+1 | call setline(l, &quot;#include &lt;string&gt;&quot;)<br
/>let l=l+1 | call setline(l, &quot;#include &lt;climits&gt;&quot;)<br
/>let l=l+1 | call setline(l, &quot;using namespace std;&quot;)<br
/>let l=l+1 | call setline(l, &quot;#define NEXT(v, n) (((v) == (n))? 0 : (v))&quot;)<br
/>let l=l+1 | call setline(l, &quot;#define SZ(x) ((int) x.size())&quot;)<br
/>let l=l+1 | call setline(l, &quot;typedef long long int64;&quot;)<br
/>let l=l+1 | call setline(l, &quot;template &lt;class T&gt; void get_max(T&amp; a, const T &amp;b) {b &gt; a? a = b:1;}&quot;)<br
/>let l=l+1 | call setline(l, &quot;template &lt;class T&gt; void get_min(T&amp; a, const T &amp;b) {b &lt; a? a = b:1;}&quot;)<br
/>let l=l+1 | call setline(l, &quot;&quot;)<br
/>let l=l+1 | call setline(l, &quot;int main() {&quot;)<br
/>let l=l+1 | call setline(l, &quot;&nbsp; &nbsp; return 0;&quot;)<br
/>let l=l+1 | call setline(l, &quot;}&quot;)<br
/>let l=l+1 | call setline(l, &quot;&quot;) <br
/>endfunc<br
/><br
/>cd $HOME/workspace<br
/>autocmd BufEnter * lcd %:p:h<br
/><br
/>map &lt;F9&gt; :call CR()&lt;CR&gt;&lt;space&gt;<br
/>func CR()<br
/>&nbsp;&nbsp; &nbsp;exec &quot;update&quot;<br
/>&nbsp;&nbsp; &nbsp;exec &quot;!gnome-terminal --geometry 100x30+120+120 -e \&quot;.run.sh %&lt; %&lt;.in\&quot; &quot;<br
/>endfunc<br
/><br
/>map &lt;F10&gt; :call CRm()&lt;CR&gt;&lt;space&gt;<br
/>func CRm()<br
/>&nbsp;&nbsp; &nbsp;exec &quot;update&quot;<br
/>&nbsp;&nbsp; &nbsp;exec &quot;!gnome-terminal --geometry 100x30+120+120 -e \&quot;.run.sh %&lt;\&quot; &quot;<br
/>endfunc<br
/><br
/>map&lt;F4&gt; :call SetComment()&lt;cr&gt;<br
/>func SetComment()<br
/>&nbsp;&nbsp; &nbsp;if getline('.')[0] == '/'<br
/>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;normal ^xx<br
/>&nbsp;&nbsp; &nbsp;else<br
/>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;normal 0i//<br
/>&nbsp;&nbsp; &nbsp;endif<br
/>endfunc</div></div></div> ]]></content:encoded> <wfw:commentRss>http://gccfeli.cn/2008/05/my-vimrc.html/feed</wfw:commentRss> <slash:comments>5</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)
Database Caching 7/15 queries in 0.008 seconds using disk

Served from: gccfeli.cn @ 2012-02-07 15:08:37 -->
