##Install dependency
sudo apt-get install libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev
##Configure
./configure --with-features=huge --enable-gui=gnome2 ----enable-pythoninterp=yes
OR
./configure \
--enable-cscope \
--with-features=huge \
--with-x \
--with-compiledby="Senor QA <senor@qa>"
##Make and check
make -j8
src/vim --version
you will see +clipboard feature enabled
##Install make install
##To make it default You can uninstall the vim in your system first and install your. Alternatively, following the following instructions to make your newly build one default
To make newly installed version “/usr/local/bin/vim” the default one, we’ll use “update-alternatives”.
sudo update-alternatives --install "/usr/bin/vim" "vim" "/usr/local/bin/vim" 1
sudo update-alternatives --install "/usr/bin/vi" "vi" "/usr/local/bin/vim" 1
sudo update-alternatives --config vim
sudo update-alternatives --config vi
sudo update-alternatives --config gvim
ls -lah /usr/bin/vim
to check it's a link to your new vim
:syntax enable " enable syntax highlighting
:set previewheight=12 " set gdb window initial height
:run macros/gdb_mappings.vim " source key mappings listed in this, F7 to toggle the mappings
:set asm=0 " don't show any assembly stuff
:set gdbprg=gdb " set GDB invocation string (default 'gdb'), optional
. Mappings gdb-mappings
The gdb() function accepts a string as single argument which is sent to GDB as
a GDB command. This can be used to map any command to a key sequence. Examples
of such mappings are given in 'macros/gdb_mappings.vim'. To use those
mappings, source the script: >
:run macros/gdb_mappings.vim
The key is used to toggle between the 'gdb_mappings.vim' mappings and the
default Vim mappings.
List of key mappings in 'gdb_mappings.vim':
launch the interactive gdb input-line window
CTRL-Z send an interrupt to GDB and the program it is running
B info breakpoints
L info locals
A info args
S step
I stepi
CTRL-N next: next source line, skipping all function calls
X nexti
F finish
R run
Q quit
C continue
W where
CTRL-U up: go up one frame
CTRL-D down: go down one frame
CTRL-B set a breakpoint on the line where the cursor is located
CTRL-E clear all breakpoints on the line where the cursor is located
CTRL-P Normal mode: print value of word under cursor
Visual mode: GDB command "createvar" selected expression, see
|gdb-variables|
CTRL-X print value of data referenced by word under cursor
CTRL-B and CTRL-E operate both on source code and on disassembled code in
assembly buffers.