Skip to main content


Vim function GetProjectForFile()

Posted in

function! GetProjectForFile(filePath)
    if a:filePath == ""
        return ""

    " read projects file
    for sLine in readfile(g:projectFile)

Switching between .cpp and .h in vim

Posted in

When navigating through source code it is really nice to be able to jump from your source file to its header and vice verse.

Vim as IDE again

Posted in

Along with studying Qt Creator I'm trying to keep on using vim and some changes have been made since my last post about vim as IDE. I would like to share some new functionality with you.

Vim as IDE

Posted in

I like vim very much and I often(nearly all the time) use it for development. But vim as it is just a text editor lacks some functionality, that is needed for development.

Run SQL query in vim

Posted in

Lets take a look at how commands can be executed in vim with passing some data from the file you are editing at this moment.

Hex in vim

Posted in

map <F4> :execute HexView()<CR>
let s:hflag=0
function! HexView()
    if s:hflag == 0
        let s:hflag=1
        return ":%!xxd"
        let s:hflag=0

Comments in vim

Posted in

When writing code, I always wanted to be able to select a block of code and then [un]comment it. Here are my attempts to make it possible. The main achievent is that it works in 'VISUAL' mode too.

Syndicate content