Navigating your code in Emacs

Submitted by admin on

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 

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.