Check all vim colorschemes for minor issues

2013-10-10 2 min read Bash Vim Tips

Here is script that checks all the colorschemes in the current directory and corrects them if possible (Processing of the file is done with simple commands like sed, grep)

Checks that the color_name is same as Filename

Here is the script:

#!/bin/bash -
#===============================================================================
#
#          FILE: check_colors.sh
#
#         USAGE: ./check_colors.sh
#
#   DESCRIPTION:
#
#       OPTIONS: ---
#  REQUIREMENTS: ---
#          BUGS: ---
#         NOTES: ---
#        AUTHOR: Amit Agarwal (aka), 
#      REVISION:  ---
#===============================================================================
cd ~/.vim/colors
for i in *vim
do
    #echo "Processing $i"
    if [[ $(grep -c g:colors_name $i ) -eq 0 ]]; then
        if [[ $(grep -c colors_name $i ) -eq 0 ]]; then
            echo "File $i does not have colorname";
            missing=$missing" $i"
        else
            sed -i.bak '/colors_name/ s/.*/let g:colors_name="'${i//.vim}'"/g' $i
        fi
    else
        if [[ $(grep -c colors_name $i|grep let ) -gt 1 ]]; then
            echo "WARN ----->> File $i has more than one colorsname"
        fi
        colorname=$(grep g:colors_name $i|grep let| sed -e 's/"//g' -e 's/.*=//' |tr -d ' ')
        if [[ ${colorname}.vim != $i ]]; then
            echo "Filename $i does not match colorname $colorname .. correcting "
            sed -i.bak '/colors_name/ s/.*/let g:colors_name="'${i//.vim}'"/g' $i
            #sed -i.bak 's/(.*g:colors_name.*=)/1'${i//.vim}'/g' $i
        fi
    fi
done

if [[ x$missing != x ]] ; then
    echo "Missing colornames in $missing"
fi

 

Continue reading

cream bash ide – vim with bash support

2012-03-14 1 min read Fedora Linux Uncategorized

 

English: Screenshot of graphical vim (gvim) sh...
Image via Wikipedia

Here you can find the cream editor. This is basically vim editor with lots of customizations thus making it simpler for the users to use the editor directly.

This version already has the bash and perl support plugins and thus you can start using them as IDE without the need to add any plugins. It has a simple and advanced mode. In the simple mode you need not worry about all the modes of the vi/vim editor. How cool is that 🙂

Continue reading

Get yourself som new themes for vim

2012-02-15 1 min read Vim Tips

Well, you would already have some themes for your vim, by default. And if you did not like them then you would have added some of your own too (downloaded from vim.org). But, those are something, that you might not still like and want to make some changes.

Here’s, a new way to do it. Just go to the link mentioned below and click on Generate Dark or Generate Light. You can generate as many as you like and once you like the theme, simply click on vim in the bottom and download 🙂 BTW, you can generate textmate and Emacs theme as well.

Continue reading

monkeystudio IDE on Fedora 12.. IDE of choice

2010-03-30 2 min read Learning Linux

<a href="http://www.monkeystudio.org/" target="_blank">Monkey IDE is a Free <a class="zem_slink freebase/en/cross-platform" title="Cross-platform" rel="wikipedia" href="http://en.wikipedia.org/wiki/Cross-platform">crossplatform <a class="zem_slink freebase/en/qt" title="Qt (framework)" rel="homepage" href="http://qt.nokia.com/">Qt 4 IDE

MonkeyStudio is a crossplatform <a class="zem_slink freebase/en/integrated_development_environment" title="Integrated development environment" rel="wikipedia" href="http://en.wikipedia.org/wiki/Integrated_development_environment">Integrated Development Environment ( IDE ) aiming to become a <a class="zem_slink freebase/en/rapid_application_development" title="Rapid application development" rel="wikipedia" href="http://en.wikipedia.org/wiki/Rapid_application_development">Rapid Application Development ( RAD ) environment. MonkeyStudio runs everywhere Qt 4.4.0 ( minimum required to build it ) is available as a <a class="zem_slink freebase/en/library" title="Library (computing)" rel="wikipedia" href="http://en.wikipedia.org/wiki/Library_%28computing%29">shared library. It is extensible via a great and powerful <a class="zem_slink freebase/en/plugin" title="Plug-in (computing)" rel="wikipedia" href="http://en.wikipedia.org/wiki/Plug-in_%28computing%29">plugin system which help make it do nearly anything you want and support virtually any kind of project type for which a plugin exists or is created. The primary goal of MonkeyStudio was to manage Qt4 projects as best as possible, it directly uses .pro files and does not create intrusive or unsightly <a class="zem_slink freebase/en/configuration_file" title="Configuration file" rel="wikipedia" href="http://en.wikipedia.org/wiki/Configuration_file">configuration files. MonkyStudio is also a multi language <a class="zem_slink freebase/en/source_code_editor" title="Source code editor" rel="wikipedia" href="http://en.wikipedia.org/wiki/Source_code_editor">code editor too ( javascript, xml, … ).

Continue reading