Primo commit
@ -0,0 +1,11 @@
|
||||
# -*- mode: gitignore; -*-
|
||||
auto-save-list/
|
||||
elpa/
|
||||
emms/
|
||||
eshell/
|
||||
games/
|
||||
server/
|
||||
transient/
|
||||
url/
|
||||
amx-items
|
||||
recentf
|
@ -0,0 +1,163 @@
|
||||
;;; early-init.el --- File di configurazione "early-init" di GNU Emacs -*- mode: emacs-lisp; lexical-binding: t;-*-
|
||||
|
||||
;; Copyright (C) 2020 Geraldo Biotti
|
||||
|
||||
;; Author: Geraldo Biotti <gbiotti@gmail.com>
|
||||
;; Created: 20200731
|
||||
;; Keywords: init, early-init, .emacs.d, startup
|
||||
;; Compatiblity: emacs-version >= 27
|
||||
|
||||
;; This file is not part of GNU Emacs.
|
||||
|
||||
;; This program is free software: you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or (at
|
||||
;; your option) any later version.
|
||||
|
||||
;; This program is distributed in the hope that it will be useful, but
|
||||
;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
;; General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Questo file contiene le impostazioni di GNU Emacs che vengono eseguite
|
||||
;; durante la fase di Early Init.
|
||||
;;
|
||||
;; La fase di Early Init e' stata introdotta con GNU Emacs versione 27
|
||||
;;
|
||||
;; Per maggiori informazioni fare riferimento al manuale di GNU Emacs
|
||||
;; versione 27 o successiva: 49.4.6 - The Early Init File
|
||||
|
||||
;;; To do:
|
||||
|
||||
;;; Change log:
|
||||
|
||||
;;; Code:
|
||||
|
||||
;; N.B.: Ho rimosso l'impostazione del lexical-binding:
|
||||
;; -*- lexical-binding: t; -*-
|
||||
|
||||
|
||||
;; Imposto l'ora di avvio di Emacs
|
||||
;; Servira' alla fine per determinare quanto tempo e' trascorso
|
||||
(defconst gb/emacs/emacs-startup-time (current-time))
|
||||
|
||||
;; Imposto le varibili di appoggio usate per ripristinare
|
||||
;; le impostazioni di default procedura di inizializzazione
|
||||
(defvar gb/emacs/gc-cons-threshold-original gc-cons-threshold
|
||||
"Valore originale di 'gc-cons-threshold' prima della modifica.
|
||||
Salvato per ripristinarlo alla fine della procedura di inizializzazione")
|
||||
|
||||
(defvar gb/emacs/gc-cons-percentage-original gc-cons-percentage
|
||||
"Valore originale di 'gc-cons-percentage' prima della modifica.
|
||||
Salvato per ripristinarlo alla fine della procedura di inizializzazione")
|
||||
|
||||
(defvar gb/emacs/file-name-handler-alist-original file-name-handler-alist
|
||||
"Valore originale di 'file-name-handler-alist' prima della modifica.
|
||||
Salvato per ripristinarlo alla fine della procedura di inizializzazione")
|
||||
|
||||
;; Imposta la soglia del garbage collector
|
||||
;; Da reimpostare poi ai valori corretti con apposito
|
||||
;; codice richiamato in after-init-hook
|
||||
(setq gc-cons-threshold (* 1024 (* 1024 1024)) ; 1 GByte
|
||||
gc-cons-percentage 0.6)
|
||||
|
||||
;; Imposta file-name-handler-alist
|
||||
;; Da reimpostare poi ai valori corretti con apposito
|
||||
;; codice richiamato in after-init-hook
|
||||
(setq file-name-handler-alist nil)
|
||||
|
||||
;; Aggiungo ad after-init-hook il codice necessario
|
||||
;; per reimpostare i valori di default nelle variabili
|
||||
;; usate qui sopra e fare una garbage-collect finale.
|
||||
;; Si usa una depth 90 (vedi docstring di di "add-hook")
|
||||
(add-hook 'after-init-hook
|
||||
'(lambda ()
|
||||
;; Non imposto piu' 'gc-cons-threshold' al suo valore originale ma, come
|
||||
;; riportato in molti siti ad un valore molto piu' alto.
|
||||
;; Si veda, ad esempio qui: https://emacs-lsp.github.io/lsp-mode/page/performance/
|
||||
;; (consultato 31/08/2020)
|
||||
;; (setq gc-cons-threshold gb/emacs/gc-cons-threshold-original)
|
||||
;; 100 Mb = (* 1024 (* 1024 100)))
|
||||
(setq gc-cons-threshold (* 1024 (* 1024 100)))
|
||||
;; Sempre https://emacs-lsp.github.io/lsp-mode/page/performance/
|
||||
;; raccomanda di impostare 'read-process-output-max' ad un valore di 1Mb
|
||||
;; (numero massimo di bytes letti in un singolo chunk dai subprocess)
|
||||
(setq read-process-output-max (* 1024 1024))
|
||||
(setq gc-cons-percentage gb/emacs/gc-cons-percentage-original)
|
||||
(setq file-name-handler-alist gb/emacs/file-name-handler-alist-original)
|
||||
(garbage-collect)
|
||||
(defvar gb/emacs/elapsed (float-time
|
||||
(time-subtract (current-time) gb/emacs/emacs-startup-time))
|
||||
)
|
||||
(message (emacs-init-time))
|
||||
(message "Loading done in %.3fs seconds and %d garbage collections [after-init]"
|
||||
gb/emacs/elapsed
|
||||
gcs-done)
|
||||
)
|
||||
90
|
||||
)
|
||||
|
||||
;; Non rende disponibili i package all'avvio di Emacs
|
||||
;; da usare qui e non in init.el
|
||||
(setq package-enable-at-startup nil)
|
||||
|
||||
;; Per GNU Emacs versione 27 e successive
|
||||
(when (not (version< emacs-version "27"))
|
||||
(progn
|
||||
;; Consente il caricamento dalla cache dei package
|
||||
(setq package-quickstart t)
|
||||
)
|
||||
)
|
||||
|
||||
;; Non ridimnensiona il frame in questo momento
|
||||
(setq frame-inhibit-implied-resize t)
|
||||
|
||||
;; Su Windows, assumendo di aver installato Scoop, ne metto il path
|
||||
;; in testa, altrimenti vengono prima trovati gli eseguibili nelle
|
||||
;; directory di sistema. Questo crea confusione, ad esempio concat
|
||||
;; "find" che esiste sia in ambiente Linux che in Windows, ovviamente
|
||||
;; con sintassi completamente diverse. Generalmente mi apsetto che
|
||||
;; le funzionalita' siano quelle del mondo Linux e non quelle del
|
||||
;; mondo Windows per cui faccio in modo che vengano lette per prima.
|
||||
;; Da notare che Scoop aggiunge le sue directory al Path, ma queste
|
||||
;; sono di tipo utente e vengono aggiunte al path dopo quelle di
|
||||
;; sistema. Si avra' un "doppione" nel path, ma va bene.
|
||||
(when (eq system-type 'windows-nt)
|
||||
(defvar gb/emacs/scoop-shim-path
|
||||
(concat (expand-file-name "~/scoop/shims")
|
||||
path-separator)
|
||||
"Percorso per 'scoop/shims' da aggiungere in testa al PATH."
|
||||
)
|
||||
;;(add-to-list 'exec-path "c:/Users/Geraldo/scoop/shims")
|
||||
(add-to-list 'exec-path gb/emacs/scoop-shim-path)
|
||||
;; (setenv "PATH" (concat gb/emacs/scoop-shim-path
|
||||
;; (getenv "PATH")))
|
||||
)
|
||||
|
||||
(provide 'early-init)
|
||||
|
||||
;;(progn
|
||||
;; (setq gb/frame-font
|
||||
;; (cond ((find-font (font-spec :name "DejaVu Sans mono")) '(font . "DejaVu Sans Mono-10"))
|
||||
;; ((find-font (font-spec :name "Consolas")) '(font . "Consolas-10"))
|
||||
;; ((find-font (font-spec :name "Inconsolata")) '(font . "Inconsolata-10"))
|
||||
;; ((find-font (font-spec :name "Courier New")) '(font . "Courier New-10"))
|
||||
;; ))
|
||||
;; (print gb/frame-font)
|
||||
;; (add-to-list 'default-frame-alist gb/frame-font)
|
||||
;; (add-to-list 'initial-frame-alist gb/frame-font))
|
||||
|
||||
;; ===========================================================================
|
||||
;; Local Variables:
|
||||
;; coding: utf-8-unix
|
||||
;; indent-tabs-mode: nil
|
||||
;; tab-width: 4
|
||||
;; End:
|
||||
;; ===========================================================================
|
||||
|
||||
;;; early-init.el ends here
|
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 15 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 330 KiB |
After Width: | Height: | Size: 335 KiB |
@ -0,0 +1,227 @@
|
||||
;;; init.el --- File di configurazione di GNU Emacs -*- mode: emacs-lisp; lexical-binding: t;-*-
|
||||
|
||||
;; Copyright (C) 2020 Geraldo Biotti
|
||||
|
||||
;; Author: Geraldo Biotti <gbiotti@gmail.com>
|
||||
;; Created: 20200731
|
||||
;; Keywords: init, early-init, .emacs.d, startup
|
||||
;; Compatiblity: emacs-version >= 27
|
||||
|
||||
;; This file is not part of GNU Emacs.
|
||||
|
||||
;; This program is free software: you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or (at
|
||||
;; your option) any later version.
|
||||
|
||||
;; This program is distributed in the hope that it will be useful, but
|
||||
;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
;; General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Questo file contiene le impostazioni di GNU Emacs che vengono eseguite
|
||||
;; durante la fase di Init.
|
||||
;; La fase di Init viene eseguita successivamente a quella di Early Init
|
||||
;;
|
||||
;; Per maggiori informazioni fare riferimento al manuale di GNU Emacs:
|
||||
;; 49.4 The Emacs Initialization File
|
||||
|
||||
;;; To do:
|
||||
|
||||
;;; Change log:
|
||||
|
||||
;;; Code:
|
||||
|
||||
;; ----------------------------------------------------------------------------------------
|
||||
;; https://etienne.depar.is/emacs.d/init.html
|
||||
;; https://github.com/MatthewZMD/.emacs.d
|
||||
|
||||
;; https://www.reddit.com/r/emacs/comments/2edbau/what_are_some_great_emacsd_examples/
|
||||
;; https://www.reddit.com/r/emacs/comments/2edbau/what_are_some_great_emacsd_examples/
|
||||
|
||||
;; https://github.com/AndreaCrotti
|
||||
|
||||
;; https://github.com/grettke/
|
||||
|
||||
;; Pastebin off topic:
|
||||
;; https://www.privacytools.io/
|
||||
;; https://alternativeto.net/list/18434/xenmaster-s-privacy-tools
|
||||
|
||||
;; https://send-anywhere.com/
|
||||
;; https://framasoft.org/en/
|
||||
;; https://gofile.io/welcome
|
||||
;; ----------------------------------------------------------------------------------------
|
||||
|
||||
;; N.B.: Ho rimosso l'impostazione del lexical-binding:
|
||||
;; -*- lexical-binding: t; -*-
|
||||
|
||||
;; Se la versione e' inferiore alla 26.1 emetto un warning
|
||||
(when (version< emacs-version "26.1")
|
||||
(warn "E' necessario che GNU Emacs sia in versione 26.1 o successiva!"))
|
||||
|
||||
(defun gb/emacs/package-setup ()
|
||||
"Function che imposta 'package'"
|
||||
;; Carico il modulo di gestione dei packages
|
||||
(require 'package)
|
||||
;; Carica sempre il file piu' recente tra '.el' e '.elc'
|
||||
(setq load-prefer-newer t)
|
||||
;; Aggiungo all'elenco dei repositories da cui scaricare i packages
|
||||
;; la versione "unstable" di Melpa
|
||||
(add-to-list 'package-archives
|
||||
'("melpa" . "https://melpa.org/packages/"))
|
||||
;; Genera dei warnings con i package-install
|
||||
(unless (bound-and-true-p package--initialized)
|
||||
(package-initialize))
|
||||
)
|
||||
|
||||
(defun gb/emacs/init-old-emacs-version ()
|
||||
"Function eseguita per il setup di init.el quando si sta usando Emacs
|
||||
in versione precedente alla 27"
|
||||
;; Early-init e' gestito automaticamente dalla versione 27 in poi
|
||||
;; Se esiste early-init.el lo carico
|
||||
(let ((gb/emacs/early-init-file (expand-file-name "early-init.el" user-emacs-directory)))
|
||||
(when (file-exists-p gb/emacs/early-init-file)
|
||||
(require 'early-init gb/emacs/early-init-file)))
|
||||
(gb/emacs/package-setup)
|
||||
)
|
||||
|
||||
(defun gb/emacs/init-new-emacs-version ()
|
||||
"Function eseguita per il setup di init.el quando si sta usando Emacs
|
||||
in versione 27+"
|
||||
;; Avvio package
|
||||
(gb/emacs/package-setup)
|
||||
)
|
||||
|
||||
;; Eseguo le impostazioni in base alla versione di GNU Emacs
|
||||
(if (version< emacs-version "27")
|
||||
(gb/emacs/init-old-emacs-version)
|
||||
(gb/emacs/init-new-emacs-version))
|
||||
|
||||
;; Delight e' un package che viene usato da use-package
|
||||
;; mi accerto che sia installato, se non lo e' lo installo
|
||||
;; N.B.: Se non si vuole averlo come dipendenza e' bene
|
||||
;; installarlo prima di use-package
|
||||
(unless (package-installed-p 'delight)
|
||||
(unless package-archive-contents
|
||||
(package-refresh-contents))
|
||||
(package-install 'delight))
|
||||
|
||||
;; Diminish e' un package che viene usato da use-package
|
||||
;; mi accerto che sia installato, se non lo e' lo installo
|
||||
;; N.B.: Se non si vuole averlo come dipendenza e' bene
|
||||
;; installarlo prima di use-package
|
||||
(unless (package-installed-p 'diminish)
|
||||
(unless package-archive-contents
|
||||
(package-refresh-contents))
|
||||
(package-install 'diminish))
|
||||
|
||||
;; Mi accerto che use-package sia installato
|
||||
;; se non lo e' lo installo
|
||||
(unless (package-installed-p 'use-package)
|
||||
(unless package-archive-contents
|
||||
(package-refresh-contents))
|
||||
(package-install 'use-package))
|
||||
|
||||
;; Carico use-package
|
||||
(eval-when-compile
|
||||
(require 'use-package))
|
||||
|
||||
;; Configuro use-package prima di caricarlo
|
||||
(eval-and-compile
|
||||
(if init-file-debug
|
||||
(setq use-package-verbose t
|
||||
use-package-expand-minimally nil
|
||||
use-package-compute-statistics t
|
||||
debug-on-error t) ; True
|
||||
(setq use-package-verbose nil
|
||||
use-package-expand-minimally t) ; False
|
||||
)
|
||||
(setq use-package-enable-imenu-support t
|
||||
;; Quanto segue e' MOLTO IMPORTANTE:
|
||||
;; Usare sempre gli hook con il loro nome completo
|
||||
;; al posto del nome abbreviato:
|
||||
;; after-init --> after-init-hook
|
||||
;; Questo migliora la gestione della documentazione
|
||||
;; a riconoscere il contesto (vedi, ad esempio 'describe-symbol)
|
||||
use-package-hook-name-suffix nil)
|
||||
)
|
||||
|
||||
;; Configuro vc (package gestione "version cotrol"
|
||||
(use-package vc
|
||||
:config
|
||||
;; Questo perche' i miei "dotfiles" usano i link simbolici
|
||||
(setq vc-follow-symlinks t)
|
||||
)
|
||||
|
||||
;; Carico org
|
||||
(use-package org
|
||||
;; Accertarsi di caricare quello presente nel repository GNU
|
||||
;; e non quello "builtin": quello in GNU e' sempre aggiornato.
|
||||
:pin gnu
|
||||
:ensure org
|
||||
)
|
||||
|
||||
;; Qui avviene la magia.
|
||||
;; Carico la configurazione dal file "org"
|
||||
;; Cerco pero' di ottimizzare un mimino la cosa:
|
||||
;; se il file "el" generato da org-babel e' piu' recente
|
||||
;; del file "org" allora carico "el" altrimenti passo
|
||||
;; all'uso di org-babel
|
||||
(progn (defvar gb/emacs/gb-init "gb-init")
|
||||
(defvar gb/emacs/conf-filename (expand-file-name gb/emacs/gb-init user-emacs-directory))
|
||||
(defvar gb/emacs/el-conf-filename (concat gb/emacs/conf-filename ".el"))
|
||||
(defvar gb/emacs/org-conf-filename (concat gb/emacs/conf-filename ".org"))
|
||||
(if (file-exists-p gb/emacs/el-conf-filename)
|
||||
(if (file-newer-than-file-p gb/emacs/org-conf-filename gb/emacs/el-conf-filename)
|
||||
(progn (message "%s e' piu' recente di %s, ricreo e carico il .el"
|
||||
gb/emacs/org-conf-filename
|
||||
gb/emacs/el-conf-filename)
|
||||
(org-babel-load-file gb/emacs/org-conf-filename))
|
||||
(progn (message "%s e' meno recente di %s, carico il .el senza ricrearlo"
|
||||
gb/emacs/org-conf-filename
|
||||
gb/emacs/el-conf-filename)
|
||||
(load-file gb/emacs/el-conf-filename)))
|
||||
(progn (message "Creo e carico %s" gb/emacs/el-conf-filename)
|
||||
(org-babel-load-file gb/emacs/org-conf-filename))
|
||||
)
|
||||
)
|
||||
|
||||
;; NON RIMUOVERE CUSTOM DA QUI
|
||||
;; ---------------------------
|
||||
;; Si potrebbe cedere alla tentazione di avere un init.el piu' "pulito"
|
||||
;; spostando custom-set-variables e custom-set-faces in un file separato,
|
||||
;; ma questo porta spesso a comportamenti altalenanti: se si installa un
|
||||
;; package con use-package e la sua opzione :ensure, capita che il package
|
||||
;; venga installato, ma la variabile package-selected-packages non venga
|
||||
;; aggiornata correttamente portanto il package installato ad uno stato
|
||||
;; di "dependency" in list-packages con invito alla rimozione qualora questo
|
||||
;; non fosse effettivamente utilizzato anche come dipendenza da qualche altro
|
||||
;; package
|
||||
(custom-set-variables
|
||||
;; custom-set-variables was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(package-selected-packages
|
||||
'(modus-themes dockerfile-mode cargo docker docker-compose-mode flycheck-rust impatient-mode simple-httpd yasnippet yasnippet-snippets org projectile company-go go-errcheck go-mode company-auctex auctex sql-indent markdown-mode csharp-mode powershell counsel-projectile ibuffer-projectile rainbow-delimiters smartparens flycheck-pos-tip flycheck highlight-indent-guides aggressive-indent pcre2el emms pdf-tools csv-mode pretty-mode elfeed-protocol elfeed-org elfeed-goodies elfeed company-restclient restclient treemacs-all-the-icons treemacs-projectile treemacs-magit treemacs git-timemachine gitattributes-mode gitignore-mode gitconfig-mode magit undo-tree origami company-quickhelp ace-window avy symon beacon htmlize org-edna org-bullets amx ivy-hydra all-the-icons-ivy-rich ivy-rich swiper hydra which-key dashboard minions doom-modeline base16-theme seti-theme moe-theme solarized-theme color-theme-sanityinc-tomorrow dracula-theme atom-one-dark-theme zerodark-theme gruvbox-theme monokai-theme zenburn-theme material-theme spacemacs-theme doom-themes all-the-icons-ibuffer all-the-icons-dired all-the-icons async use-package diminish delight)))
|
||||
(custom-set-faces
|
||||
;; custom-set-faces was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
)
|
||||
|
||||
;; ===========================================================================
|
||||
;; Local Variables:
|
||||
;; coding: utf-8-unix
|
||||
;; indent-tabs-mode: nil
|
||||
;; tab-width: 4
|
||||
;; End:
|
||||
;; ===========================================================================
|
||||
|
||||
;;; init.el ends here
|
@ -0,0 +1,136 @@
|
||||
set nocompatible
|
||||
|
||||
if has("gui_running")
|
||||
let do_syntax_sel_menu=1
|
||||
endif
|
||||
|
||||
set langmenu=none
|
||||
if has("win32") || has("win64")
|
||||
language messages en_US
|
||||
else
|
||||
language messages en_US.UTF-8
|
||||
endif
|
||||
|
||||
if has("multi_byte")
|
||||
if has("win32") || has("win64")
|
||||
if has("gui_running")
|
||||
set encoding=utf-8
|
||||
endif
|
||||
endif
|
||||
set encoding=utf-8
|
||||
endif
|
||||
|
||||
set nocompatible
|
||||
|
||||
" set modeline
|
||||
|
||||
set backspace=indent,eol,start
|
||||
|
||||
" Highlight problematic whitespace
|
||||
" set listchars=tab:>.,trail:.,extends:#,nbsp:.
|
||||
" set listchars=eol:¶,tab:»,trail:·,extends:>,precedes:<,nbsp:¤
|
||||
" il carattere per eol (¶) si ottiene con CTRL-vu00b6
|
||||
" il carattere per tab (») si ottiene con CTRL-vu00bb
|
||||
" seguito da \<spazio> oppure
|
||||
" il carattere per trail (·) si ottiene con CTRL-vu00b7
|
||||
" il carattere per extends (>) e' il carattere di maggiore
|
||||
" il carattere per precedes (<) e' il carattere di minore
|
||||
" il carattere per nbsp (¤) si ottiene con CTRL-vu00a4
|
||||
set listchars=eol:¶,tab:»\ ,trail:·,extends:>,precedes:<,nbsp:¤
|
||||
|
||||
set number
|
||||
set relativenumber
|
||||
set history=50
|
||||
set incsearch
|
||||
set ignorecase
|
||||
set smartcase
|
||||
set wrapscan
|
||||
|
||||
" Make the 'cw' and like commands put a $ at the end instead of
|
||||
" just deleting the text and replacing it
|
||||
set cpoptions=ces$
|
||||
|
||||
set statusline=%<%F\ %h%m%r%w%q\ %y\(%{&ff}\)\ %=\ \#%n\ ln:%l\/%L[%P]\ co:%c%V\ %b
|
||||
|
||||
set lazyredraw
|
||||
set showmode
|
||||
set foldenable
|
||||
set foldopen=block,insert,jump,mark,percent,quickfix,search,tag,undo
|
||||
set whichwrap=b,s,h,l,<,>,[,]
|
||||
set scrolljump=0
|
||||
set scrolloff=0
|
||||
set sidescrolloff=0
|
||||
set wildmenu
|
||||
set showfulltag
|
||||
set diffopt+=iwhite
|
||||
set clipboard+=unnamed
|
||||
set grepprg=grep\ -nH\ $*
|
||||
|
||||
" let loaded_matchparen=1
|
||||
|
||||
set showtabline=2
|
||||
set nostartofline
|
||||
set nospell " spell checking off (default!)
|
||||
if has("autocmd")
|
||||
filetype plugin indent on
|
||||
augroup vimrcEx
|
||||
au!
|
||||
autocmd BufReadPost *
|
||||
\ if line("'\"") > 1 && line("'\"") <= line("$") |
|
||||
\ exe "normal! g`\"" |
|
||||
\ endif
|
||||
augroup END
|
||||
|
||||
endif " has("autocmd")
|
||||
|
||||
set nowrap
|
||||
set autoindent
|
||||
set tabstop=4
|
||||
set shiftwidth=4
|
||||
set softtabstop=4
|
||||
set noexpandtab
|
||||
|
||||
if has("mouse")
|
||||
set mouse=a
|
||||
endif
|
||||
|
||||
if &t_Co > 2 || has("gui_running")
|
||||
syntax enable
|
||||
set hlsearch
|
||||
set synmaxcol=2048
|
||||
endif
|
||||
|
||||
if has("cmdline_info")
|
||||
set noruler
|
||||
set showcmd
|
||||
endif
|
||||
|
||||
if has("statusline")
|
||||
set laststatus=2
|
||||
set statusline=%<%f\ " Filename
|
||||
set statusline+=%w%h%m%r " Options
|
||||
set statusline+=\ [%{&ff}/%Y] " filetype
|
||||
set statusline+=\ [%{getcwd()}] " current dir
|
||||
"set statusline+=\ [A=\%03.3b/H=\%02.2B] " ASCII / Hexadecimal value of char
|
||||
set statusline+=%=%-14.(%l,%c%V%)\ %p%% " Right aligned file nav info
|
||||
endif
|
||||
|
||||
if has("gui_running")
|
||||
" GUI
|
||||
set cursorline
|
||||
set guicursor=n-v-c:block-Cursor-blinkon0,ve:ver35-Cursor,o:hor50-Cursor,i-ci:ver25-Cursor,r-cr:hor20-Cursor,sm:block-Cursor-blinkwait175-blinkoff150-blinkon175
|
||||
set cmdheight=2 " Abbreviato: set ch=2
|
||||
set mousehide
|
||||
endif
|
||||
|
||||
set shortmess+=I
|
||||
|
||||
" CTRL-U in insert mode deletes a lot. Use CTRL-G u to first break undo,
|
||||
" so that you can undo CTRL-U after inserting a line break.
|
||||
inoremap <C-U> <C-G>u<C-U>
|
||||
|
||||
set background=dark
|
||||
|
||||
"
|
||||
" vim: set tabstop=4:shiftwidth=4:filetype=vim:fdm=marker:fileformat=unix:
|
||||
"
|