Skip to content

Commit 19804ed

Browse files
committed
emacs: how to refresh packages list
1 parent 0ff590c commit 19804ed

File tree

9 files changed

+263
-69
lines changed

9 files changed

+263
-69
lines changed

bin/archlinux-post-install-script

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22
# =================================================
33
# Created: Dom 29/Dez/2013 hs 07:08
4-
# Last Change: 2018 mar 13 07:30
4+
# Last Change: 2018 mar 14 14:50
55
# This script aims: arch linux post install script
66
# Author: Sérgio Luiz Araújo Silva
77
# Site: http://vivaotux.blogspot.com
@@ -46,6 +46,9 @@ yaourt -S pamac-aur
4646
#sudo hddtemp /dev/sda
4747
sudo pacman -S hddtemp
4848

49+
# audiobooks reader
50+
yaourt cozy-audiobooks
51+
4952
# Gerenciador de janelas i3
5053
sudo pacman -S i3 dmenu
5154

@@ -591,6 +594,9 @@ yaourt -S rfkill
591594
# \LaTeX\
592595
yaourt -S texlive-core texlive-langcjk texlive-latexextra texlive-pictures haskell-pandoc xelatex
593596

597+
# testing this version
598+
sudo pacman -S texlive-latexextra
599+
594600
# record your tty
595601
# asciinema -rec filename -c command
596602
# to insert command at stackExchange

emacs

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,51 @@
33
;;(menu-bar-mode -1)
44
;;(scroll-bar-mode -1)
55

6+
7+
;; kill region =============================================================
8+
(defun xah-delete-current-text-block ()
9+
"Delete the current text block or selection, and copy to `kill-ring'.
10+
A “block” is text between blank lines.
11+
12+
URL `http://ergoemacs.org/emacs/emacs_delete_block.html'
13+
Version 2017-07-09"
14+
(interactive)
15+
(let ($p1 $p2)
16+
(if (use-region-p)
17+
(setq $p1 (region-beginning) $p2 (region-end))
18+
(progn
19+
(if (re-search-backward "\n[ \t]*\n+" nil "move")
20+
(progn (re-search-forward "\n[ \t]*\n+")
21+
(setq $p1 (point)))
22+
(setq $p1 (point)))
23+
(re-search-forward "\n[ \t]*\n" nil "move")
24+
(setq $p2 (point))))
25+
(kill-region $p1 $p2)))
26+
(global-set-key (kbd "C-c k") 'xah-delete-current-text-block)
27+
28+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
29+
;; kill line if no region active ;;
30+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
31+
;; http://emacs-fu.blogspot.co.uk/2009/11/copying-lines-without-selecting-them.html
32+
(defadvice kill-region (before slick-cut activate compile)
33+
"When called interactively with no active region, kill a single line instead."
34+
(interactive
35+
(if mark-active (list (region-beginning) (region-end))
36+
(list (line-beginning-position)
37+
(line-beginning-position 2)))))
38+
39+
;; =============== Highlight current line =========================
40+
;; In every buffer, the line which contains the cursor will be fully
41+
;; highlighted
42+
(global-hl-line-mode 1)
43+
44+
;; ========== Enable Line and Column Numbering ==========
45+
;; Show line-number in the mode line
46+
(line-number-mode 1)
47+
48+
;; Show column-number in the mode line
49+
(column-number-mode 1)
50+
651
;; Added by Package.el. This must come before configurations of
752
;; installed packages. Don't delete this line. If you don't want it,
853
;; just comment it out by adding a semicolon to the start of the line.
@@ -116,7 +161,7 @@
116161
("marmelade" . "http://marmalade-repo.org/packages/"))))
117162
'(package-selected-packages
118163
(quote
119-
(ergoemacs-mode evil-visual-mark-mode solarized-theme org color-theme-solarized))))
164+
(expand-region ergoemacs-mode evil-visual-mark-mode solarized-theme org color-theme-solarized))))
120165
(custom-set-faces
121166
;; custom-set-faces was added by Custom.
122167
;; If you edit it by hand, you could mess it up, so be careful.
@@ -166,3 +211,7 @@ there's a region, all lines that region covers will be duplicated."
166211
;; to copy current line 5 times just:
167212
;; M-5 C-c d
168213
(global-set-key (kbd "C-c d") 'duplicate-current-line-or-region)
214+
215+
;; ================= melpa ==========================================
216+
(add-to-list 'package-archives
217+
'("marmalade" . "http://marmalade-repo.org/packages/") t)

nvim/init.vim

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
" nvim file: ~/.config/nvim/init.vim
2-
" Last Change: 2018 mar 13 10:15
2+
" Last Change: 2018 mar 13 14:34
33
" vim: ff=unix ai et ts=4
44
" Author: Sérgio Luiz Araújo Silva
55
" Reference: http://sergioaraujo.pbworks.com/w/page/15864094/vimrc
@@ -775,7 +775,8 @@ augroup python
775775
au! BufRead,Bufnewfile *.py im :<CR> :<CR><TAB>
776776
au! BufWritePre *.py,*.js :call <SID>StripTrailingWhitespace()
777777
au! BufNewFile *.py 0r ~/.vim/skel/template.py
778-
au BufNewFile *.py call Preserve('1,5s/Created:\s\+\zs.*/\=strftime("%Y %b %d %H:%M")/ei')
778+
"au BufNewFile *.py call Preserve('1,5s/Created:\s\+\zs.*/\=strftime("%Y %b %d %H:%M")/ei')
779+
au BufNewFile *.py call Preserve('1,5s/\(Last Change\|Created\):\s\+\zs.*/\=strftime("%Y %b %d %H:%M")/ei')
779780
au BufNewFile *.py :%s/File:\s\+\zs.*/\=expand("%:t")
780781
au! BufWritePost *.py :silent !chmod a+x <afile>
781782
autocmd FileType python set textwidth=79

vim/skel/template.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# # -*- coding: UTF-8 -*-"
33
# ------------------------------------------------
44
# File: <+filename+>
5-
# Creation Date: <+type creation's date+>
5+
# Created: <+type creation's date+>
66
# Last Change: <+type change date+>
77
# Author: sergio luiz araujo silva
88
# Site: http://vivaotux.blogspot.com

vim/skel/template.zsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# =================================================
33
# File: <+filename+>
44
# Created: <+type creation's date+>
5-
# Last Change: 2017 dez 27 13:14
5+
# Last Change: <+Change date+>
66
# This script aims: <+describe your dile here+>
77
# Author: sérgio luiz araújo silva
88
# Site: http://vivaotux.blogspot.com

vim/wiki/concurso.md

Lines changed: 117 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,124 @@ Dica do Sapia: https://www.youtube.com/watch?v=jM5hpV1d1pc
1515

1616
# Língua Portuguesa
1717

18+
Denotação - Sentido literal
19+
Conotação - Sentido figurado
20+
21+
## Figuras de linguagem
22+
23+
METONÍMIA
24+
25+
Metonímia é o uso da parte pelo todo. Ocorre quando o autor substitui uma
26+
palavra por outra próxima. É utilizada para evitar a repetição de palavras em
27+
um texto. Por exemplo:
28+
29+
– “Os meus braços precisam dos teus”
30+
31+
Na frase acima, Vinicius de Morais se refere à necessidade que ele tem de ter a presença de outra pessoa e não somente dos braços.
32+
33+
34+
– “Eu adoro ler Maurício de Souza”
35+
36+
É um processo de substituição por aproximação, substituir a obra pelo autor
37+
Outra metonímia - Vamos ao mercado comprar Qboa - (água sanitária)
38+
39+
EUFEMISMO - amenização tipo: "Ele partiu para a outra vida"
40+
ao invés de dizer "ele morreu"
41+
42+
METÁFORA
43+
44+
A metáfora ocorre quando é utilizada uma substituição de termos que possuem significados diferentes, atribuindo a eles o mesmo sentido. Veja o exemplo abaixo:
45+
46+
“Meu pensamento é um rio subterrâneo.”
47+
48+
SINESTESIA
49+
50+
A sinestesia é o jogo da mistura das sensações. Quando na mesma oração o autor
51+
realiza o cruzamento de diferentes sentidos humanos.
52+
53+
Sinestesia é uma figura de linguagem muito utilizada em livros e poesias em geral. É muito comum também notar sua presença em letras de música.
54+
55+
Perceba no exemplo abaixo:
56+
57+
“Ela sentiu o sabor frio da derrota”
58+
59+
CATACRESE
60+
61+
A Catacrese é um tipo de recurso muito interessante. Tal figura de linguagem
62+
ocorre quando atribuímos um “nome” a algo que não possui um nome específico,
63+
fazendo referência a outras coisas e objetos.
64+
65+
Ótimos exemplos seriam
66+
67+
o “céu da boca”
68+
69+
a “asa da xícara”.
70+
71+
Perceba que nossa boca não possui um céu de fato, assim como a xícara não
72+
possui asas de fato, parte atribuída somente às aves.
73+
74+
ANTÍTESE
75+
76+
Quando, em uma mesma oração, usamos termos que possuem sentidos contrários,
77+
configura-se a antítese. Por exemplo:
78+
79+
“O Renato estava dormindo acordado na aula”
80+
81+
Perceba que “dormindo” e “acordado” entram em contraste de significado na frase.
82+
83+
PARADOXO
84+
85+
Esta figura de linguagem se refere a algo “contrário ao que se pensa”, fugindo
86+
do senso comum e até mesmo refletindo a falta de nexo. Confira um exemplo
87+
simples de um paradoxo:
88+
89+
“Ele não passa de um pobre homem rico”
90+
91+
HIPÉRBOLE
92+
93+
Ao contrário de eufemismo, a hipérbole é uma figura de linguagem que dá um exagero intencional ao contexto. Por exemplo, em vez de dizermos “eu estou com muita sede“, as vezes dizemos
94+
95+
“estou morrendo de sede“.
96+
97+
Na verdade, não estamos morrendo literalmente, mas ocorre um exagero para
98+
ilustrar a grandeza da sede.
99+
100+
IRONIA
101+
102+
Ironia é a utilização proposital de termos que manifestam o sentido oposto do
103+
seu significado. Por exemplo, uma pessoa que foi demitida após péssimo dia de
104+
trabalho, dizer:
105+
106+
“- Era o que faltava para encerrar o meu dia maravilhosamente bem”.
107+
108+
APÓSTROFE
109+
110+
Apóstrofe é muito interessante. Esta figura de linguagem ocorre quando alguma
111+
pessoa faz uso da “invocação” de algo ou alguém para manifestar algum sentido
112+
ao contexto. Por exemplo:
113+
114+
“Meu Deus! Que susto!”.
115+
116+
PERSONIFICAÇÃO ou PROSOPOPEIA
117+
118+
A personificação ou prosopopeia ocorre quando atribuímos sentidos racionais a
119+
elementos irracionais. Por exemplo, quando dizemos
120+
121+
“A natureza está em chorando…”
122+
123+
Estamos atribuindo o “choro” (algo racional) à natureza (um elemento
124+
irracional). Outro exemplo seria dizer “Meu coração está em pratos…“.
125+
126+
PLEONASMO
127+
128+
Pleonasmo é muito utilizado no dia-a-dia. Trata-se da repetição de palavras que
129+
tem o mesmo significado, em uma mesma oração.
130+
131+
Exemplos:
132+
133+
“Sair para fora”, “subir para cima”, “dupla de dois”…
134+
18135
r35qis3 303r3 W02r*uq
19-
http://va.mu/eLCb
20136
http://www.youtube.com/watch?v=j5kq0zYLgrE
21137

22138
Várias questões:

vim/wiki/emacs.md

Lines changed: 65 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,28 @@ the end of the expression and press
4242

4343
C-x C-e
4444

45+
# Install new packages
46+
47+
;; ================== add melpa repo ==================================
48+
;; add to the end of your ~/.emacs
49+
(add-to-list 'package-archives
50+
'("marmalade" . "http://marmalade-repo.org/packages/") t)
51+
52+
So you can run
53+
54+
M-x list-packages
55+
M-x package-refresh-contents
56+
57+
to list all packages which will automatically refresh the archive contents.
58+
4559
# Open customize options
4660

4761
M-x customize
4862

4963
# Selections
5064

5165
Select whole file ........... C-x h
66+
Select more lines ........... C-Spacebar (C-n or C-p)
5267

5368

5469
# Setting marks to delete regions
@@ -500,54 +515,56 @@ C-M-w append-next-kill
500515
ESC ESC Prefix Command
501516
C-M-\ indent-region
502517
M-SPC just-one-space
503-
M-! shell-command
504-
M-$ ispell-word
505-
M-% query-replace
506-
M-' abbrev-prefix-mark
507-
M-( insert-parentheses
508-
M-) move-past-close-and-reindent
509-
M-* pop-tag-mark
510-
M-, tags-loop-continue
511-
M-- negative-argument
512-
M-. find-tag
513-
M-/ dabbrev-expand
514-
M-: eval-expression
515-
M-; comment-dwim
516-
M-< beginning-of-buffer
517-
M-= count-lines-region
518-
M-> end-of-buffer
519-
M-@ mark-word
520-
M-\ delete-horizontal-space
521-
M-^ delete-indentation
522-
M-` tmm-menubar
523-
M-a backward-sentence
524-
M-b backward-word
525-
M-c capitalize-word
526-
M-d kill-word
527-
M-e forward-sentence
528-
M-f forward-word
529-
M-g Prefix Command
530-
M-h mark-paragraph
531-
M-i tab-to-tab-stop
532-
M-j indent-new-comment-line
533-
M-k kill-sentence
534-
M-l downcase-word
535-
M-m back-to-indentation
536-
M-o facemenu-keymap
537-
M-q fill-paragraph
538-
M-r move-to-window-line
539-
M-s Prefix Command
540-
M-t transpose-words
541-
M-u upcase-word
542-
M-v scroll-down
543-
M-w kill-ring-save
544-
M-x execute-extended-command
545-
M-y yank-pop
546-
M-z zap-to-char
547-
M-{ backward-paragraph
548-
M-| shell-command-on-region
549-
M-} forward-paragraph
550-
M-~ not-modified
518+
M-! shell-command
519+
M-$ ispell-word
520+
M-% query-replace
521+
M-' abbrev-prefix-mark
522+
M-( insert-parentheses
523+
M-) move-past-close-and-reindent
524+
M-* pop-tag-mark
525+
M-, tags-loop-continue
526+
M-- negative-argument
527+
M-. find-tag
528+
M-/ dabbrev-expand
529+
M-: eval-expression
530+
M-; comment-dwim
531+
M-< beginning-of-buffer
532+
M-= count-lines-region
533+
M-> end-of-buffer
534+
M-@ mark-word
535+
M-\ delete-horizontal-space
536+
M-^ delete-indentation
537+
M-` tmm-menubar
538+
M-a backward-sentence
539+
M-b backward-word
540+
M-c capitalize-word
541+
M-d kill-word
542+
M-e forward-sentence
543+
M-f forward-word
544+
C-3 M-f forward three words
545+
C-u 3 M-f forward three words
546+
M-g Prefix Command
547+
M-h mark-paragraph
548+
M-i tab-to-tab-stop
549+
M-j indent-new-comment-line
550+
M-k kill-sentence
551+
M-l downcase-word
552+
M-m back-to-indentation
553+
M-o facemenu-keymap
554+
M-q fill-paragraph
555+
M-r move-to-window-line
556+
M-s Prefix Command
557+
M-t transpose-words
558+
M-u upcase-word
559+
M-v scroll-down
560+
M-w kill-ring-save
561+
M-x execute-extended-command
562+
M-y yank-pop
563+
M-z zap-to-char
564+
M-{ backward-paragraph
565+
M-| shell-command-on-region
566+
M-} forward-paragraph
567+
M-~ not-modified
551568
M-DEL backward-kill-word
552569
C-M-S-v scroll-other-window-down
553570
C-M-SPC mark-sexp

0 commit comments

Comments
 (0)