
{"id":187,"date":"2015-03-15T20:59:43","date_gmt":"2015-03-15T20:59:43","guid":{"rendered":"http:\/\/timallen.name\/?p=187"},"modified":"2018-08-01T13:59:17","modified_gmt":"2018-08-01T13:59:17","slug":"my-vimrc","status":"publish","type":"post","link":"https:\/\/timallen.name\/index.php\/2015\/03\/15\/my-vimrc\/","title":{"rendered":"My .vimrc"},"content":{"rendered":"<p>execute pathogen#infect()<br \/>\n nmap <F8> :TagbarToggle<CR><\/p>\n<p> source ~\/.vim\/vimrcs\/basic.vim<br \/>\n source ~\/.vim\/vimrcs\/filetypes.vim<br \/>\n source ~\/.vim\/vimrcs\/plugins_config.vim<br \/>\n source ~\/.vim\/vimrcs\/extended.vim<\/p>\n<p> try<br \/>\n source ~\/.vim\/my_configs.vim<br \/>\n catch<br \/>\n endtry<\/p>\n<p> &#8221; Highlight all instances of word under cursor, when idle.<br \/>\n &#8221; Useful when studying strange source code.<br \/>\n &#8221; Type z\/ to toggle highlighting on\/off.<br \/>\n nnoremap z\/ :if AutoHighlightToggle()<Bar>set hls<Bar>endif<CR><br \/>\n function! AutoHighlightToggle()<br \/>\n     let @\/ = &#8221;<br \/>\n     if exists(&#8216;#auto_highlight&#8217;)<br \/>\n         au! auto_highlight<br \/>\n         augroup! auto_highlight<br \/>\n         setl updatetime=4000<br \/>\n         echo &#8216;Highlight current word: off&#8217;<br \/>\n         return 0<br \/>\n     else<br \/>\n         augroup auto_highlight<br \/>\n             au!<br \/>\n             au CursorHold * let @\/ = &#8216;\\V\\<'.escape(expand('<cword>&#8216;), &#8216;\\&#8217;).&#8217;\\>&#8217;<br \/>\n         augroup end<br \/>\n         setl updatetime=500<br \/>\n         echo &#8216;Highlight current word: ON&#8217;<br \/>\n         return 1<br \/>\n     endif<br \/>\n endfunction<\/p>\n","protected":false},"excerpt":{"rendered":"<p>execute pathogen#infect() nmap :TagbarToggle source ~\/.vim\/vimrcs\/basic.vim source ~\/.vim\/vimrcs\/filetypes.vim source ~\/.vim\/vimrcs\/plugins_config.vim source ~\/.vim\/vimrcs\/extended.vim try source ~\/.vim\/my_configs.vim catch endtry &#8221; Highlight all instances of word under cursor, when idle. &#8221; Useful when studying strange source code. &#8221; Type z\/ to toggle highlighting on\/off. nnoremap z\/ :if AutoHighlightToggle()set hlsendif function! AutoHighlightToggle() let @\/ = &#8221; if exists(&#8216;#auto_highlight&#8217;) au! &hellip; <a href=\"https:\/\/timallen.name\/index.php\/2015\/03\/15\/my-vimrc\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">My .vimrc<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-187","post","type-post","status-publish","format-standard","hentry","category-general-programming"],"_links":{"self":[{"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/posts\/187","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/comments?post=187"}],"version-history":[{"count":6,"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/posts\/187\/revisions"}],"predecessor-version":[{"id":346,"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/posts\/187\/revisions\/346"}],"wp:attachment":[{"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/media?parent=187"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/categories?post=187"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/timallen.name\/index.php\/wp-json\/wp\/v2\/tags?post=187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}