Monday, July 7, 2014

Ubuntu Alarm Clock

I really like the old Ubuntu alarmclock instead of the new alarm-clock-applet. The reason is that alarmclock offers a way to save and load the alarm list which no other apps I know of can do. Today after rebooting, I couldn't see my alarms any more. After a few hours of try-and-error, I found the fix. It turned out that my alarmclock's config for some reason refused to open the app. So I moved ~/.config/alarmclock/alarms.conf to another folder, reinstalled alarmclock and reloaded my alarm list. Everything went to normal now, Hooray!

Tuesday, July 1, 2014

Adding another file type for ctags parsing

Normal ctags commands to support C++ parsing:

$ ctags -R --c++-kinds=+cdefglmnpstuvx --fields=+iaS --extra=+q

This will generate the ctags database from the following file types under the current directory:

 *.c++ *.cc *.cp *.cpp *.cxx *.h *.h++ *.hh *.hp *.hpp *.hxx *.C *.H

(From ctags --list-maps)

If another file type needs to be included for the parsing, for example you want to add *.inl file type to C++ language map, add the following line to ~/.ctags.

--langmap=c++:+.inl
 
To check:

$ ctags --list-maps | grep C++
C++      *.c++ *.cc *.cp *.cpp *.cxx *.h *.h++ *.hh *.hp *.hpp *.hxx *.C *.H *.inl

Run ctags again to regenerate the database with the support of *.inl files as well.

$ ctags -R --c++-kinds=+cdefglmnpstuvx --fields=+iaS --extra=+q