First, we define a global prefix key:
(general-create-definer global-definer
:keymaps 'override
:states '(insert emacs normal hybrid motion visual operator)
:prefix "SPC"
:non-normal-prefix "S-SPC")
You may want a linter plugin to lint your code in Vim but you probably don't need it. At least try the built-in way before jumping on the plugin bandwagon.
autocmd FileType <filetype> setlocal makeprg=<external command>
This autocommand tells Vim to use <external command>
when invoking :make %
in a <filetype>
buffer. You can add as many similar lines as needed for other languages.
" ========================================================================/// | |
" Description: import UltiSnips snippets as VsCode snippets for vim-vsnip | |
" File: import.vim | |
" Author: Gianmaria Bajo <mg1979@git.gmail.com> | |
" License: MIT | |
" Created: dom 09 agosto 2020 13:14:35 | |
" Modified: dom 09 agosto 2020 15:33:32 | |
" ========================================================================/// | |
function! import#snippets(ask_confirm) abort |
In Neovim, the .
character repeats "the most recent action"; however, this is not always respected by plugin actions. Here we will explore how to build dot-repeat support directly into your plugin, bypassing the requirement of dependencies like repeat.vim.
When some buffer-modifying action is performed, Neovim implicitly remembers the operator (e.g. d
), motion (e.g. iw
), and some other miscellaneous information. When the dot-repeat command is called, Neovim repeats that operator-motion combination. For example, if we type ci"text<Esc>
, then we replace the inner contents of some double quotes with text
, i.e. "hello world"
→ "text"
. Dot-repeating from here will do the same, i.e. "more samples"
→ "text"
.
# On slow systems, checking the cached .zcompdump file to see if it must be | |
# regenerated adds a noticable delay to zsh startup. This little hack restricts | |
# it to once a day. It should be pasted into your own completion file. | |
# | |
# The globbing is a little complicated here: | |
# - '#q' is an explicit glob qualifier that makes globbing work within zsh's [[ ]] construct. | |
# - 'N' makes the glob pattern evaluate to nothing when it doesn't match (rather than throw a globbing error) | |
# - '.' matches "regular files" | |
# - 'mh+24' matches files (or directories or whatever) that are older than 24 hours. | |
autoload -Uz compinit |
(setq show-paren-style 'expression) | |
(show-paren-mode 2) | |
(menu-bar-mode -1) | |
(tool-bar-mode -1) | |
(setq make-backup-files nil) ; Don't want any backup files | |
(setq auto-save-list-file-name nil) ; Don't want any .saves files | |
(setq auto-save-default nil) ; Don't want any auto saving |