Navigating your code in Emacs

Navigating in Emacs

It is important to be able to navigate your files easily.

Thanks to the customizability of emacs you can change the default behavior in a few easy steps.

Change your file search to swiper like this:

(global-set-key (kbd "C-s") 'counsel-grep-or-swiper)

Sometime you just need to duplicate a line to make something close. Put this in your dot-emacs file:

(global-set-key "\C-c\C-d" "\C-a\C- \C-n\M-w\C-y")

lsp-mode usage

Use the following code to enable lsp-mode for php.

(use-package lsp-mode
 :ensure t
 :config
 (setq lsp-headerline-breadcrumb-enable nil) ;; works
 (setq lsp-enable-symbol-highlighting nil) ;; works
 (setq lsp-signature-render-documentation nil)
 (setq lsp-completion-provider :none) ;; works
 (setq lsp-diagnostics-provider :flymake) ;; underline error
 )

(require 'lsp-mode)
(add-hook 'php-mode-hook #'lsp)

Use Phpactor

Phpactor is... here 

DIRED

When you are in a buffer for an opened file you can use the command dired-jump (C-x C-j) to open the dired list of the directory holding the file you are currently editing.

Tags

Add new comment

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
Please share this article on your favorite website or platform.