{"id":262,"date":"2015-12-29T15:12:38","date_gmt":"2015-12-29T20:12:38","guid":{"rendered":"http:\/\/www.mbeckler.org\/blog\/?p=262"},"modified":"2016-02-09T19:11:01","modified_gmt":"2016-02-10T00:11:01","slug":"my-vimrc-file-circa-2015","status":"publish","type":"post","link":"https:\/\/www.mbeckler.org\/blog\/?p=262","title":{"rendered":"My .vimrc file, circa 2015"},"content":{"rendered":"<p><em>Note: All my config dotfiles are now in <a href=\"https:\/\/github.com\/matthewbeckler\/dotfiles\/\">a repository at GitHub<\/a>.<\/em><\/p>\n<p>Mostly the same as <a href=\"https:\/\/www.mbeckler.org\/blog\/?p=21\">last time<\/a>, with a few updates from the last few years of working in the real world. Important additions are the ignorecase\/smartcase\/incsearch to improve searching, adding a new &#8220;rr&#8221; code that inserts the regex to remove trailing spaces, and the final line will set vim to use the CTAGS files specified in the shell envvar $CTAGS_DB. The four let lines in the middle are supposed to change your terminal cursor based on your mode, but sometimes it seems to mess up the terminal so your mileage may vary. Includes auto indent and auto syntax highlighting. I use a black background terminal, so the \u201cset bg=dark\u201d optimizes the colors for a dark background. I like 4 spaces for my indenting, no tabs. I use the F5 key to toggle search result highlighting, and F6 to toggle between paste mode (no auto-indent) and no-paste mode.<\/p>\n<pre>set backupcopy=yes\r\nset softtabstop=4\r\nset autoindent\r\nset cindent\r\nset shiftwidth=4\r\nset shiftround\r\nset expandtab\r\nset formatoptions=t\r\nset textwidth=0\r\nset mouse=a\r\nset backspace=indent,eol,start\r\nset ignorecase\r\nset smartcase\r\nset incsearch\r\n\r\nmap &lt;f5&gt; :set hls!&lt;bar&gt;set hls?&lt;CR&gt;\r\nmap &lt;f6&gt; :set paste!&lt;bar&gt;set paste?&lt;CR&gt;\r\n\r\nlet &t_ti.=\"\\e[1 q\"\r\nlet &t_SI.=\"\\e[5 q\"\r\nlet &t_EI.=\"\\e[1 q\"\r\nlet &t_te.=\"\\e[0 q\"\r\n\r\nsyntax enable\r\nset background=dark\r\n\r\nnmap rr :%s\/\\s\\+$\/\/g\r\n\r\nlet &tags=$CTAGS_DB<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Note: All my config dotfiles are now in a repository at GitHub. Mostly the same as last time, with a few updates from the last few years of working in the real world. Important additions are the ignorecase\/smartcase\/incsearch to improve searching, adding a new &#8220;rr&#8221; code that inserts the regex to remove trailing spaces, and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"New blog post: My .vimrc file, circa 2015","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1],"tags":[],"class_list":["post-262","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p2BznB-4e","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.mbeckler.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/262","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mbeckler.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mbeckler.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mbeckler.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mbeckler.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=262"}],"version-history":[{"count":7,"href":"https:\/\/www.mbeckler.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/262\/revisions"}],"predecessor-version":[{"id":290,"href":"https:\/\/www.mbeckler.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/262\/revisions\/290"}],"wp:attachment":[{"href":"https:\/\/www.mbeckler.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=262"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mbeckler.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=262"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mbeckler.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=262"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}