From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sivaram Neelakantan Newsgroups: gmane.emacs.help Subject: Re: About Emacs features Date: Wed, 15 Jan 2014 08:11:23 +0530 Message-ID: <87bnzedl0s.fsf@gmail.com> References: <5928e34ffcfb51d4deee8b35ef474471@ltu.sld.cu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1389753737 2958 80.91.229.3 (15 Jan 2014 02:42:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 15 Jan 2014 02:42:17 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jan 15 03:42:23 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W3GQx-0002iX-Ar for geh-help-gnu-emacs@m.gmane.org; Wed, 15 Jan 2014 03:42:23 +0100 Original-Received: from localhost ([::1]:51721 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3GQw-0006QB-VG for geh-help-gnu-emacs@m.gmane.org; Tue, 14 Jan 2014 21:42:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55261) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3GQL-0005pA-4B for help-gnu-emacs@gnu.org; Tue, 14 Jan 2014 21:41:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W3GQD-00006e-OO for help-gnu-emacs@gnu.org; Tue, 14 Jan 2014 21:41:44 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:56684) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W3GQD-00006V-Ej for help-gnu-emacs@gnu.org; Tue, 14 Jan 2014 21:41:37 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1W3GQB-0001Or-4v for help-gnu-emacs@gnu.org; Wed, 15 Jan 2014 03:41:35 +0100 Original-Received: from 122.167.79.238 ([122.167.79.238]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 15 Jan 2014 03:41:35 +0100 Original-Received: from nsivaram.net by 122.167.79.238 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 15 Jan 2014 03:41:35 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 43 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 122.167.79.238 User-Mail-Address: nsivaram.net@gmail.com User-Agent: Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (windows-nt) Cancel-Lock: sha1:7ErhH2Ogzi+mlzzj7G6nIXB77hI= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:95406 Archived-At: On Tue, Jan 14 2014,Alejandro Zamora Fonseca Alejandro Zamora Fonseca wrote: > Hello! > I´m a Emacs new user and I have a question. > How I can auto-complete words and create 'macros'(code snipets rapid > generation) like in Notepad++.? > > Thanks, > Alejandro > > try auto-complete which might be a bit more natural. And I got this snippet from the list here a long time ago. TAB does some completions --8<---------------cut here---------------start------------->8--- ;;;;re-using tab (defun indent-or-expand (arg) "Either indent according to mode, or expand the word preceding point." (interactive "*P") (if (and (or (bobp) (= ?w (char-syntax (char-before)))) (or (eobp) (not (= ?w (char-syntax (char-after)))))) (dabbrev-expand arg) (indent-according-to-mode))) (defun my-tab-fix () (local-set-key [tab] 'indent-or-expand)) (add-hook 'c-mode-hook 'my-tab-fix) (add-hook 'sh-mode-hook 'my-tab-fix) (add-hook 'text-mode-hook 'my-tab-fix) (add-hook 'emacs-lisp-mode-hook 'my-tab-fix) --8<---------------cut here---------------end--------------->8--- [snipped 8 lines] sivaram --