{"id":1279,"date":"2019-01-02T13:56:36","date_gmt":"2019-01-02T19:56:36","guid":{"rendered":"http:\/\/blog.ls-al.com\/?p=1279"},"modified":"2019-01-02T13:56:37","modified_gmt":"2019-01-02T19:56:37","slug":"vim-and-auto-indent-unwanted-new-lines","status":"publish","type":"post","link":"https:\/\/blog.ls-al.com\/vim-and-auto-indent-unwanted-new-lines\/","title":{"rendered":"Vim And Auto Indent Unwanted New Lines"},"content":{"rendered":"\n

Recently I experienced a very annoying issue with copy\/paste. Pasting a line using the Gnome terminal Control-V or Right Mouse Button caused the line to insert with an unwanted new line. I am not sure when or why this started but it could have to do with the file being called \"changelog\" and\/or vim identifying the file as type \"changelog\". Using \":set\" while editing the file does list autoindent.<\/p>\n\n\n\n

Note that this issue does not appear with yank and put (Shift-Y and Shift-P) commands. For the moment I am getting around this by adding \":set pastetoggle=<F5>\" to my .vimrc. Then before pasting press F5. You could also just do \":set paste\" while editing and the paste would work normal for that paste.<\/p>\n","protected":false},"excerpt":{"rendered":"

Recently I experienced a very annoying issue with copy\/paste. Pasting a line using the Gnome terminal Control-V or Right Mouse<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[104],"tags":[],"class_list":["post-1279","post","type-post","status-publish","format-standard","hentry","category-vim"],"_links":{"self":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/posts\/1279","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/comments?post=1279"}],"version-history":[{"count":0,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/posts\/1279\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/media?parent=1279"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/categories?post=1279"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ls-al.com\/wp-json\/wp\/v2\/tags?post=1279"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}