mirror of
				https://github.com/tiyn/dotfiles.git
				synced 2025-10-30 20:11:16 +01:00 
			
		
		
		
	Compare commits
	
		
			6 Commits
		
	
	
		
			0187e53508
			...
			46649c2ac8
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 46649c2ac8 | |||
| a6402bc0b6 | |||
| 56ab3588da | |||
| 158e080d53 | |||
| 17bc342b1f | |||
| ee25f73134 | 
| @@ -444,57 +444,16 @@ nnoremap S :sort<cr> | |||||||
| nnoremap w :view<cr> | nnoremap w :view<cr> | ||||||
| vnoremap w :view<cr>gv | vnoremap w :view<cr>gv | ||||||
|  |  | ||||||
| " Open file in existing instance of gvim | " Open file in existing instance of vim | ||||||
| nnoremap o :!gvim --remote-tab-silent %f<cr> | nnoremap o :!$EDITOR %f<cr> | ||||||
| " Open file in new instance of gvim |  | ||||||
| nnoremap O :!gvim %f<cr> |  | ||||||
|  |  | ||||||
| " Open file in the background using its default program |  | ||||||
| nnoremap gb :file &<cr>l |  | ||||||
|  |  | ||||||
| " Interaction with system clipboard |  | ||||||
| if has('win') |  | ||||||
|     " Yank current directory path to Windows clipboard with forward slashes |  | ||||||
|     nnoremap yp :!echo %"d:gs!\!/! %i | clip<cr> |  | ||||||
|     " Yank path to current file to Windows clipboard with forward slashes |  | ||||||
|     nnoremap yf :!echo %"c:gs!\!/! %i | clip<cr> |  | ||||||
| elseif executable('xclip') |  | ||||||
|     " Yank current directory path into the clipboard |  | ||||||
|     nnoremap yd :!echo %d | xclip %i<cr> |  | ||||||
|     " Yank current file path into the clipboard |  | ||||||
|     nnoremap yf :!echo %c:p | xclip %i<cr> |  | ||||||
| elseif executable('xsel') |  | ||||||
|     " Yank current directory path into primary and selection clipboards |  | ||||||
|     nnoremap yd :!echo -n %d | xsel --input --primary %i && |  | ||||||
|                 \ echo -n %d | xsel --clipboard --input %i<cr> |  | ||||||
|     " Yank current file path into into primary and selection clipboards |  | ||||||
|     nnoremap yf :!echo -n %c:p | xsel --input --primary %i && |  | ||||||
|                 \ echo -n %c:p | xsel --clipboard --input %i<cr> |  | ||||||
| endif |  | ||||||
|  |  | ||||||
| " Mappings for faster renaming | " Mappings for faster renaming | ||||||
| nnoremap I cw<c-a> | nnoremap I cw<c-a> | ||||||
| nnoremap cc cw<c-u> | nnoremap cc cw<c-u> | ||||||
| nnoremap A cw |  | ||||||
|  |  | ||||||
| " Open console in current directory | " Mapping for extraction and compression | ||||||
| nnoremap ,t :!xterm &<cr> | nnoremap xx :!vifm_extract %f<cr> | ||||||
|  | nnoremap aa :!vifm_compress %f 7z | ||||||
| " Open editor to edit vifmrc and apply settings after returning to vifm |  | ||||||
| nnoremap ,c :write | edit $MYVIFMRC | restart<cr> |  | ||||||
| " Open gvim to edit vifmrc |  | ||||||
| nnoremap ,C :!gvim --remote-tab-silent $MYVIFMRC &<cr> |  | ||||||
|  |  | ||||||
| " Toggle wrap setting on ,w key |  | ||||||
| nnoremap ,w :set wrap!<cr> |  | ||||||
|  |  | ||||||
| " Example of standard two-panel file managers mappings |  | ||||||
| nnoremap <f3> :!less %f<cr> |  | ||||||
| nnoremap <f4> :edit<cr> |  | ||||||
| nnoremap <f5> :copy<cr> |  | ||||||
| nnoremap <f6> :move<cr> |  | ||||||
| nnoremap <f7> :mkdir<space> |  | ||||||
| nnoremap <f8> :delete<cr> |  | ||||||
|  |  | ||||||
| " ------------------------------------------------------------------------------ | " ------------------------------------------------------------------------------ | ||||||
|  |  | ||||||
|   | |||||||
| @@ -1,7 +1,7 @@ | |||||||
| # Disable ctrl-s and ctrl-q. | # Disable ctrl-s and ctrl-q. | ||||||
| stty -ixon | stty -ixon | ||||||
|  |  | ||||||
| setopt autocd autopushd \ | setopt autocd autopushd | ||||||
|  |  | ||||||
| # Enable autosuggestions | # Enable autosuggestions | ||||||
| source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh | source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh | ||||||
|   | |||||||
							
								
								
									
										1
									
								
								.local/bin/etc/vifm/vifm_compress
									
									
									
									
									
										Symbolic link
									
								
							
							
						
						
									
										1
									
								
								.local/bin/etc/vifm/vifm_compress
									
									
									
									
									
										Symbolic link
									
								
							| @@ -0,0 +1 @@ | |||||||
|  | ../../tools/compress | ||||||
							
								
								
									
										1
									
								
								.local/bin/etc/vifm/vifm_extract
									
									
									
									
									
										Symbolic link
									
								
							
							
						
						
									
										1
									
								
								.local/bin/etc/vifm/vifm_extract
									
									
									
									
									
										Symbolic link
									
								
							| @@ -0,0 +1 @@ | |||||||
|  | ../../tools/extract | ||||||
							
								
								
									
										10
									
								
								.local/bin/tools/compress
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										10
									
								
								.local/bin/tools/compress
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,10 @@ | |||||||
|  | #!/bin/sh | ||||||
|  |  | ||||||
|  | if [ -e $1 ] ; then | ||||||
|  |     case $2 in | ||||||
|  |         7z)     7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=on $1.7z $1 ;; | ||||||
|  |         *)      echo "don't know how to compress '$1' in '$2'..." ;; | ||||||
|  |     esac | ||||||
|  | else | ||||||
|  |     echo "'$1' is not a valid file or directory!" | ||||||
|  | fi | ||||||
							
								
								
									
										21
									
								
								.local/bin/tools/extract
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										21
									
								
								.local/bin/tools/extract
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,21 @@ | |||||||
|  | #!/bin/sh | ||||||
|  |  | ||||||
|  | if [ -f $1 ] ; then | ||||||
|  |     case $1 in | ||||||
|  |     *.tar.bz2)    tar xvjf $1    ;; | ||||||
|  |     *.tar.gz)    tar xvzf $1    ;; | ||||||
|  |     *.tar.xz)    tar xf $1      ;; | ||||||
|  |     *.bz2)        bunzip2 $1     ;; | ||||||
|  |     *.rar)        unrar x $1     ;; | ||||||
|  |     *.gz)        gunzip $1      ;; | ||||||
|  |     *.tar)        tar xvf $1     ;; | ||||||
|  |     *.tbz2)        tar xvjf $1    ;; | ||||||
|  |     *.tgz)        tar xvzf $1    ;; | ||||||
|  |     *.zip)        unzip $1       ;; | ||||||
|  |     *.Z)        uncompress $1  ;; | ||||||
|  |     *.7z)        7z x $1        ;; | ||||||
|  |     *)        echo "don't know how to extract '$1'..." ;; | ||||||
|  |     esac | ||||||
|  | else | ||||||
|  |     echo "'$1' is not a valid file!" | ||||||
|  | fi | ||||||
		Reference in New Issue
	
	Block a user