• How to automatically enter vim with tt and ? 2018-04-14

    I am using MacVim on Mac OS X. I want to know how to automatically input <leader>tt and <C-e> and <leader>u when I enter vim first time. --------------Solutions------------- You can use :normal (without the usual !, so that the mappings

    Tags: linux, vim, macvim
  • Bad Indentation of OCaml Comments in vim 2018-03-24

    I use ocamldoc-style comment, but vim is annoying me because it indents the comment when it should not. For instance, with the following code: (** * {[ If I open a new line when being of the second line of the above code, vim will indent the code so

    Tags: vim, ocaml, auto indent
  • Jekyll goes crazy with vim foldinig bracktes {{{ }}} 2017-09-04

    Is it possible to use vim folding with jekyll? Get the following error: Liquid Exception: Variable '{{' was not properly terminated with regexp: /\}\}/ Tried // and /* */ for commenting out the line with the bracktes. --------------Solutions---------

    Tags: folding, vim, markdown, jekyll
  • Change background color of some lines in vim/macvim? 2017-08-09

    Is it possible to change the background color of some lines that I what to highlight? Thank you! --------------Solutions------------- If you know the numbers of lines you want to highlight, you can use this commands :hi LineHl ctermbg=green :match Li

    Tags: vim, macvim
  • Highlight SQL inside Python string literals 2015-12-23

    I have some Python files in which I want to highlight the SQL queries in string literals. Assume that all string literals in those files contain SQL queries. I saved the following syntax file as pysql.vim: if exists("b:current_syntax") finish en

    Tags: vim, vim syntax highlighting
  • Can't get CtrlP to set working dir as root folder 2015-08-15

    Im working on project that is in fact composed of several subproject, under a common git repository: Project - Sub Project A - Sub Project B - ... I never work on the main folder, and always start from one of the sub projects, the problem is no matte

    Tags: vim, vim plugin
  • Vim Vundle broken, can't open file

    Vim Vundle broken, can't open file 2015-03-17

    My vim setup apparently has broken out of nothing. It now spills errors for every single plugin I have configured. This started happening after I have changed some appearance settings, some syntastic features (both of which I don't think are the caus

    Tags: shell, vim, fish, vundle
  • How to save vim's state, perform a command, write to a file, restore the state? 2015-03-13

    I have a buffer in vim and want to make changes that are to be saved to a file, but I want what I see in vim to remain unchanged. That is, I want execute a function that modifies the buffer and writes it but afterward leaves the buffer, view, cursor,

    Tags: vim
  • vim: colorscheme on MS Windows display wrong colors

    vim: colorscheme on MS Windows display wrong colors 2015-03-03

    I've been strugling with this topic the whole afternoon... If I want to change the colorscheme of gvim, it's ok (here with the donbass.vim): but the same under vim, and the colors are not exact at all: the content of my vimrc, well it's on the screen

    Tags: windows, vim, color scheme
  • Vim: How to set automatic indent (using equal sign) to 4 spaces? 2015-02-09

    When I use equal sign to indent text in vim, it indents it with 3 spaces.. I need 4. The code I've tried to change it in .vimrc file (inspired by some example I've found, but it does not work): autocmd BufWinLeave *.* mkview autocmd BufWinEnter *.* s

    Tags: vim
  • Restoring Vim macro with control character 2015-02-09

    I'm using GVim on Linux, and am trying to restore a macro by sourcing a vim script, using :source command. I notice that if the saved macro contains a return key, a ^J is implicitly appended, thereby altering macro behaviour. It happens even if I ent

    Tags: vim
  • convert vim regex to python for re.sub 2015-02-04

    I have a working regex under vim: /^ \{-}\a.*$\n I implement a global search and replace as :%s/^ \{-}\a.*$\n// This works great -- removes all lines that start with any number of spaces (matched non-greedily), followed by a letter and anything else

    Tags: regex, python, vim
  • How do I let vim wrap triple-slash comments? 2015-01-21

    I often use gq to wrap longer comments to within some number of characters, which works fine if I am using // or /* /* to comment my code: // here is a simple comment that exceeds my line width // across multiple lines // here is a simple comment tha

    Tags: vim
  • How do you type in Vim? 2015-01-19

    What keys do <C-x><C-o> represent in Vim? My goal is to get autocompletions working for Golang. I've installed this plugin and have the syntax highlighting working. The readme says that, "Autocompletion is

    Tags: vim
  • C++ code to open a file in vim for editing in a terminal window from Xcode 2015-01-19

    i've been doing a search and can't quite seem to find a solution for this. I am coding a realtime openGL visual application using openFrameworks in Xcode. What I would like to do is to let the user press a button which opens up a terminal window with

    Tags: xcode, terminal, vim, openframeworks
  • How to debug the php syntax error when it is in a html file? 2015-01-19

    <?php if($val['shift_z']==1){ $arr=$val['shift_zone']; if(count($arr)>=1&&is_array($arr)){ ?> //html code //html code //html code //html code //html code <?php } } ?> like the above code,if I miss the <?php }} ?> ,it tell

    Tags: php, vim, sublimetext3
  • search and delete multiple lines including the matched line 2015-01-19

    text file: a b c d e f Now I want to search for the content c and delete the matched line and the another line immediately before it, that is, I want to delete the line b and c, I've tried :g/c/ .,-1 d, but it didn't work. How to make it? -----------

    Tags: vim
  • cscope: How to navigate back with cscope in Vim? 2015-01-07

    I'm a linux newbie and recently using Vim & Cscope reading kernel source code. Here is a line in my vimrc for finding C symbols nmap <F2>s :cs find s <C-R>=expand("<cword>")<CR><CR>:cw<CR> press F2+s, selecting

    Tags: vim, cscope
  • Vim Custom Syntax Highlight: How to highlight a variable that stores a function (CoffeScript)? 2015-01-03

    I want to highlight the function names in CoffeScript code: hightlight = -> hightlight = (args) -> Not including the following: noHighlight -> noHighlight = key: How to accoplish that with a custom Vim syntax declaration? --------------Solut

    Tags: vim, syntax highlighting, coffeescript
  • How to use gvim color scheme with vimdiff output 2015-01-03

    I am running gvim -d in a batch file and generating HTML output using TOhtml. I would like to use the console version of vimdiff to get a slight performance increase but it insists on using the 256 bit console color scheme. Is there any way to tell t

    Tags: vim, vimdiff

Copyright (C), All Rights Reserved.

processed in 4.101 (s). 9 q(s)