Planet MySQL Planet MySQL: Meta Deutsch Español Français Italiano 日本語 Русский Português 中文
Showing entries 1 to 5

Displaying posts with tag: vim (reset)

Add Gedit Plugins
+0 Vote Up -0Vote Down

Fedora comes with vim and gedit installed but the gedit installation is bare bones. You can update gedit to include supplemental Plug-ins with the following yum command as the root user:

yum install -y gedit-plugins

It generates the following log file:

Loaded plugins: langpacks, refresh-packagekit
mysql-connectors-community                                  | 2.5 kB  00:00     
mysql-tools-community                                       | 2.5 kB  00:00     
mysql56-community …
  [Read more...]
Executing MySQL queries within VIM
+1 Vote Up -0Vote Down

I haven’t been using vim for very long, but I’ve gotten over the initial learning curve of getting used to the different editing modes. With some help from the guys in #vim on, I managed to get this gem:

map <C-d> :call SwitchDB()<CR>
:function SwitchDB()
: let g:current_db = input("Database > ")

map <C-m> :call Doquery()<CR>
:function Doquery()
: if !exists("g:current_db")
: call SwitchDB()
: endif
: let query_string = input(g:current_db . " > " )
: if query_string != ""
: exe "!mysql " . …

  [Read more...]
How To Add A File Extension To vim Syntax Highlighting
+1 Vote Up -0Vote Down

Today I was asked a question about defining custom extensions for vim syntax highlighting such that, for example, vim would know that example.lmx is actually of type xml and apply xml syntax highlighting to it. I know vim already automatically does it not just based on extension but by looking for certain strings inside the text, like <?xml but what if my file doesn't have such strings?

After digging around I found the solution. Add the following to ~/.vimrc (the vim configuration file):

…  [Read more...]
Trip to Zurich
+0 Vote Up -0Vote Down

I spent Thursday and Friday in Zurich, Switzerland visiting my friends Marcus and Caitlin and attending the Google Open Source Jam.

On Thursday, I arrived in the early afternoon in Zurich. Getting to Zurich from Siegburg is easy and takes less than five …

  [Read more...]
MySQL syntax highlighting in Vim
+1 Vote Up -0Vote Down

I didn't know such a thing exists.

kostja@bodhi:/usr/share/vim/vim70/syntax> ls -al mysql.vim 
-rw-r--r-- 1 root root 16078 2006-05-24 20:16 mysql.vim

kostja@bodhi:/usr/share/vim/vim70/syntax> head -7 mysql.vim 
" Vim syntax file
" Language:     mysql
" Maintainer:   Kenneth J. Pronovici <>
" Last Change:  $Date: 2004/06/13 20:12:39 $
" Filenames:    *.mysql
" URL:
" Note:         The definitions below are taken from the mysql user manual as of April 2002, for version 3.23

To enable it in the editor:

:set filetype=mysql

Or, in your .vimrc to …

  [Read more...]
Showing entries 1 to 5

Planet MySQL © 1995, 2016, Oracle Corporation and/or its affiliates   Legal Policies | Your Privacy Rights | Terms of Use

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.