MySQL is new to me added to that recently switched to Macwas breaking my head on how to use Terminal to access MySQL.to create database and upload about 6000 records. Was gathering info from net in bits-n-pieces.Thanks again. MySQL Workbench is a unified visual tool for database architects, developers, and DBAs. MySQL Workbench provides data modeling, SQL development, and comprehensive administration tools for server configuration, user administration, backup, and much more. A good learning resource for Vim is included in Mac. Simply type vimtutor and it will teach you quickly how to use vim effectively. Another editing option on mac is nano it is a command line text editor that is much easier for those familiar with TextEdit/Notepad. MySQL Workbench is a unified visual tool for database architects, developers, and DBAs. MySQL Workbench provides data modeling, SQL development, and comprehensive administration tools for server configuration, user administration, backup, and much more.
Active3 years ago
I am new to mac, trying to edit a .gitignore file from the macbook terminal, I type
Best free video editing mac. it opens the file but not letting me switch to edit mode. How does vi switches mode on mac ?
Justin Meiners7,65655 gold badges3838 silver badges7878 bronze badges
AhmedAhmed5,6611616 gold badges7070 silver badges122122 bronze badges
closed as off-topic by Kent, Marius, loxxy, Ro Yo Mi, LuvJul 11 '13 at 4:51
- This question does not appear to be about programming within the scope defined in the help center.
2 Answers
On Mac you can more correctly type
vim
(Vi Improved) instead :)Same as everywhere,
i
switches to 'INSERT' mode and ESC
switches back to command mode.A good learning resource for Vim is included in Mac. Simply type
vimtutor
and it will teach you quickly how to use vim effectively.Another editing option on mac is
Justin Meinersnano
it is a command line text editor that is much easier for those familiar with TextEdit/Notepad.Justin Meiners
7,65655 gold badges3838 silver badges7878 bronze badges
Same as everywhere.
i
to insert. Esc
to go back to command mode, :wq
to save and quit.By the way, if you're uncomfortable with
favorettifavorettivi
, try Sublime Text 2, I love it :) It's GUI based, though.24.2k44 gold badges3737 silver badges5353 bronze badges
Not the answer you're looking for? Browse other questions tagged macosvim or ask your own question.
Vi is an one of two powerhouse text editors in the Unix world, the other being EMACS. While obtuse, vi is extremely powerful and efficient. There may be times when vi is the only text editor available, so it helps to at least know the basics.On Mac OS X (and Linux), vi is symlinked to vim (vi improved), a more modern free software version. Vim It is the default editor when changing a crontab.
If you gave vi a whirl and don't see the beauty of it, give the nano editor a try. It also ships with Mac OS X.
Download Mysql For Mac
note: a chunk of this small guide came from a web page I found long ago, but I don't remember where so I can't give proper credit. I've added and changed things from the original text.
Vi has two modes, command and insert (really, three if you count replace mode). Command mode is used to navigate, search, and issue other commands. Insert mode is used to enter text.
Vi starts in command mode.
You can precede most commands with a number indicating how many times to perform a command. For example, entering 99 followed by the down arrow will move the cursor down 99 lines. '99x' will delete 99 characters.
While in command mode (case sensitive)- move the cursor with arrow keys; if there aren't any arrow keys, use j,k,h,l
- i - change to insert mode (before cursor)
- a - change to insert mode (after cursor)
- A - change to insert mode (at end of line)
- r - replace one character
- R - overwrite text
- x - delete one character
- dd - delete one line
- yy - yank line (copy)
- p - paste deleted or yanked text after cursor
- P - paste deleted or yanked text before cursor
- G - go to end of the file
- 1G - go to top of the file
- J - merge next line with this one
- / - search, follow / with text to find
- :wq - write file and quit
- :q! - quit without saving
- %s/old/new/g - substitute; replace 'old' with 'new' on all lines
- :g/pattern/d - delete all lines that match the pattern
- ESC - change to command mode
- any text typed is entered at the cursor
- Type 'vi file.txt' at command prompt
- Move cursor to where new text will be added
- Type 'i' to change to insert mode
- Type new text
- Type ESC to go back to command mode
- type ':wq' and ENTER to write the file and quit