Monday, January 14, 2013

Vim tips: Moving around using marks and jumps



Editing in Vim can be a breeze, if you know how to make use of its more advanced features. Moving around files can feel like a slog if you're stuck with the basic movement keys, but editing is effortless when you have command of marks and jumps.
Basically, a mark is a bookmark or placeholder that allows you to return to a spot in the file where you were editing. This can be handy when you're working on longer projects, whether you're writing a long paper, making changes to your Apache configuration, or writing code.

Jumps are movements within a file. For example, when you use G to move to the last line of a file from your current position, that's a jump. Vim not only makes it easy to move from one point in the file to another, it also makes it easy to retrace your steps.



Vim mark quick reference
mx tells Vim to add a mark called x.
`x tells Vim to return to the line and column for mark x.
'x tells Vim to return to the beginning of the line where mark x is set.
`. moves the cursor to the line and column where the last edit was made.
'. moves the cursor to the line where the last edit was made.
'" moves the cursor to the last position of the cursor when you exited the previous session.
:marks shows all marks set.
:marks x shows the mark named x.
:jumps shows the jumplist.
Ctrl-o moves the cursor to the last jump.
Ctrl-i moves the cursor to the previous jump.
H moves the cursor to the top of the screen or viewport.
M moves the cursor to the middle of the screen or viewport.
L moves the cursor to the bottom of the screen or viewport.









Reference :

By Joe 'Zonker' Brockmeier



Vim tips: Folding commands





#vim

Using Vim's folding features, you can tuck away portions of a file's text so that they're out of sight until you want to work with them again. Here's how.

Vim folding commands :

zf#j creates a fold from the cursor down # lines.
zf/string creates a fold from the cursor to string .
zj moves the cursor to the next fold.
zk moves the cursor to the previous fold.
zo opens a fold at the cursor.
zO opens all folds at the cursor.
zm increases the foldlevel by one.
zM closes all open folds.
zr decreases the foldlevel by one.
zR decreases the foldlevel to zero -- all folds will be open.
zd deletes the fold at the cursor.
zE deletes all folds.
[z move to start of open fold.
]z move to end of open fold.

Ref :
Joe 'Zonker' Brockmeier

Sunday, January 13, 2013

Kubuntu 12.10 Post installation tweaks



These are a few tweaks that I like to perform on new Kubuntu installs. These all work just fine for the new 12.10 release. I got the original guide from heloudons.org

First, apply recent updates:
$ sudo apt-get update && sudo apt-get -y upgrade
And:
$ sudo apt-get dist-upgrade
Install restricted packages “kubuntu-restricted-addons” and “kubuntu-restricted-extras”.
kubuntu-restricted-addons includes GStreamer, GStreamer plugins and libdvdread4 (library for reading DVD’s) kubuntu-restricted-extras includes the Adobe Flash plugin, ffmpeg, lame (MP3 encoding library), and Microsoft TrueType fonts.
$ sudo apt-get -y install kubuntu-restricted-addons kubuntu-restricted-extras
Enable DVD playback.
$ sudo /usr/share/doc/libdvdread4/install-css.sh
Install some multi-media apps VLC, WinFF, K9Copy and Devede:
$ sudo apt-get -y install vlc vlc-plugin* winff k9copy devede
My workstation sometimes serves files over the LAN so additional Samba/CIFS utilities are helpful
$ sudo apt-get install samba samba-tools cifs-utils fuse-utils fusesmb
Install other favorite utilities
$ sudo apt-get install p7zip hplip-gui pyrenamer gimp gcolor2 agave filezilla putty tomboy kompozer
Install utilities needed for compiling apps and plasmoids.
$ sudo apt-get install cmake build-essential debhelper fakeroot checkinstall kdelibs5-dev kdebase-workspace-dev
There are no Kubuntu/KDE Screen Savers installed by default. To install:
$ sudo apt-get install kscreensaver
Optional: Improve appearance of default KDE fonts:
Fix: Go to: System Settings | Application Appearance | Font Settings
Use Ubuntu fonts, and increase all font sizes by “1″.  The default
“General” font size in “Ubuntu 9″ which is too small for my
taste.  Change to “Ubuntu 10″.
Force KDE to Anti-alias fonts properly:
Use anti-aliasing: “Enabled”
Under “Configure” –> Use sub-pixel rendering (RGB), and Hinting style: Slight
Force fonts DPI: 96 DPI
Fix Mouse Wheel Scroll behavior –> Mouse wheel scrools through Desktops
By default, when the cursor is on the desktop, mouse wheel scrolling cycles/switches through the Desktops.  I’ve found this “feature” amazingly irritating and I wish that this was disabled by default.
To deactivate this behavior:  With the cursor on the Desktop, right-click, select Desktop Settings | Mouse Actions
Remove scroll button behavior (middle selection).
Install a Chromium as a second browser.  Along with Firefox, I like to keep second browser handy.
$ sudo apt-get -y install chromium-browser chromium-codecs-ffmpeg-extra
Install Dropbox on KDE (without Gnome)
Dropbox is my favorite ‘it just works’ file syncing service and it works great under Gnome. However the Gnome/Nautilus dependency is problematic when it comes to getting Dropbox to work properly under KDE/Dolphin.  If you’re a KDE convert (like me) you can get Dropbox to work without the Gnome baggage:
1.Download the Dropbox Linux client from:
http://www.getdropbox.com/download?plat=lnx.x86 (x86_64 for 64 bit)
2.Extract the contents and you should get a .dropbox-dist folder out of the archive. Move the folder to $HOME (your home folder)
3.Run ~/.dropbox-dist/dropboxd.
Note: This installs the Dropbox daemon but there is no real Dropbox + Dolphin integration (yet).  As a work-around use Kfilebox, which is a KDE/Dolphin front-end to Dropbox. As of December 2011, the newest version is “kfilebox-0.4.8″
Website: http://kdropbox.deuteros.es/
VOIP: Install Skype
The Linux version of Skype from the Skype website works great.
Go to:
http://www.skype.com/intl/en-us/get-skype/on-your-computer/linux/
and download the .deb version and install.
$ sudo dpkg -i skype-ubuntu_2.2.0.35-1_i386.deb
Note: I had to go into the System Settings  | Multimedia | Phonon  to adjust the microphone settings on my workstation.  But after… It works great.
No thumbnails for avi files in Dolphin. Install ffmpegthumbs
$ sudo apt-get install ffmpegthumbs
To adjust Desktop Folder so that thumbnail images are generated for avi
files:  Unlock widgets
Edit Folder View Settings | Display
Check “Previews”
Go to: “More Preview Options…”
Scroll down to the bottom –> Check “Video Files (ffmpegthumbs)”

Vim remap the Caps Lock key in one of two ways


Remapping the escape key

The first thing you need to do to make using
Remap Vim to the Caps Lock key to be a Ctrl key.

This serves two purpose:

It makes it much easier to invoke CTRL commands in vim, the shell, and all your applications.

More significant is that CTRL-[ is equivalent to hitting the Esc key.

You can remap the Caps Lock key in one of two ways:

1- Using a directive in /etc/X11/xorg.conf:
In your Section "InputDevice" section for the keyboard, add the line:

Option "XkbOptions" "ctrl:nocaps"
         
2- Using an xmodmap :

Create a file in your home directory called " .Xmodmap" with the following contents:

remove Lock = Caps_Lock
remove Control = Control_L
keysym Caps_Lock = Control_L
add Control = Control_L

Refrence :
Kevin's Vim Tips and Tricks at :
http://www.8t8.us/vim/vim.html

Tuesday, January 1, 2013

Instructions to download and Install Blender 3D


Blender 2.65a

Blender 2.65a is the latest release from the Blender Foundation. To download it, please select your platform and location. Blender is Free & Open Source Software.

Blender 2.65a was released on December 20th 2012


http://www.blender.org/download/get-blender/


برنامج بلندر ( Blender )  يمكنك من تنسيق النصوص والصور والصوت و المجسمات الهندسية لكي تنتج افلام اوالعاب تعليمية عالية الجودة.



بــــلنــــــدر : 

برنامج بلندر ( Blender )  يمكنك من تنسيق النصوص والصور والصوت و المجسمات الهندسية لكي تنتج افلام اوالعاب تعليمية عالية الجودة.

التعريف ببرنامج بلندر Blender

صمم خصيصا ليمكنك من صناعة الصور، والفيديو في وضع ثنائي الأبعاد أو ثلاثي الأبعاد او رباعي الأبعاد ( متحركة ) او خماسي الأبعاد ( برامج تعليمية تفاعلية ) ويتوفر في البرنامج مميزات احترافية وله ماض وحاضر وخطط مستقبلية تشرفك بأن تتعلمه او تعلمه لطلابك. 

واجهة البرنامج Blender  لعمل الصور المتحركة 3D

قد تواجه مع هذا البرنامج صعوبة البدء بدون معلم ! حيث أن هذا البرنامج مخصص للمستخدمين ذوي الخبرة، ولكن بالرغم من أن الواجهة قد تبدوا معقدة ولكنها توفر لك خيارات عديدة لتمكنك من السيطرة على البرنامج حسب احتياجاتك الخاصة.



الموقع الرسمي لتنزيل احدث نسخة حسب نظام التشغيل في جهازك : 

http://www.blender.org/download/get-blender

بالتوفيق 



problem installing blender, you may need to install these



If you have a problem installing blender, you may need to install these using your terminal :

#
sudo apt-get install libjpeg62

#
sudo apt-get update; sudo apt-get install subversion build-essential gettext \
libxi-dev libsndfile1-dev \
libpng12-dev libfftw3-dev \
libopenexr-dev libopenjpeg-dev \
libopenal-dev libalut-dev libvorbis-dev \
libglu1-mesa-dev libsdl1.2-dev libfreetype6-dev \
libtiff4-dev libavdevice-dev \
libavformat-dev libavutil-dev libavcodec-dev libjack-dev \
libswscale-dev libx264-dev libmp3lame-dev python3.2-dev \
libspnav-dev