Flyspell is an in-line spell checker. It checks the spelling as you type.
To enable flyspell in text-mode add this in your .emacs file:
(dolist (hook ‘(text-mode-hook))
(add-hook hook (lambda () (flyspell-mode 1))))
Flyspell is an in-line spell checker. It checks the spelling as you type.
To enable flyspell in text-mode add this in your .emacs file:
(dolist (hook ‘(text-mode-hook))
(add-hook hook (lambda () (flyspell-mode 1))))
To change the major mode in Emacs use:
M-x mode_name-mode
To set the default major mode, which initially is Fundamental, add the following to your .emacs file:
(setq default-major-mode ‘mode_name-mode)
To activate auto-fill mode for all test mode buffers add this to .emacs:
(add-hook ‘text-mode-hook ‘turn-on-auto-fill)
Spaces in filenames can be a problem when using find | xargs combination.
To solve this, use:
find . -print0 | xargs -0 <command>
This tells find and xargs to use the ASCII NUL character instead of space to end (separate) the filenames.
To find the files that contain a string we can use:
find . -exec grep -l “string to find” {} \;
This starts the search from the current directory, looks for files that contain the specified string, and then it prints their names.
To start the cygwin SSH server:
net start sshd
For more information:
http://www.chinese-watercolor.com/LRP/printsrv/cygwin-sshd.html
In order to get the list of the available tables of a database in PostgreSQL, connect to that particular database and run:
SELECT tablename FROM pg_tables
WHERE tablename NOT LIKE ‘pg\\_%’
AND tablename NOT LIKE ’sql\\_%’;
In order to get the list of columns for a particular table in that database, run:
SELECT attname FROM pg_attribute, pg_type
WHERE typname = ‘table_name‘
AND attrelid = typrelid
AND attname NOT IN (‘cmin’, ‘cmax’, ‘ctid’, ‘oid’, ‘tableoid’, ‘xmin’, ‘xmax’);
To set Emacs to truncate or not to truncate long lines:
M-x toggle-truncate-lines
To set Emacs not to truncate lines when you have the window split vertically:
M-: (setq truncate-partial-width-windows nil) RET
Mark the area which is to be commented using the *blockwise* visual mode (CTRL-V, in Windows this is CTRL-Q).
Press I (capital i) and write the text you want to prepend to each line of the selected block, e.g. %.
Then press ESC and the text will be inserted to the left of each line of the selected block.
To compile a .egg from a standard setup.py based Python package, add
“from setuptools import setup“
to setup.py, before the other setup/distutils imports, and then run
./setup.py bdist_egg
This will create a .egg package in dist/ subdirectory, and can be installed with easy_install.