mirror of
				https://github.com/dcarrillo/prezto.git
				synced 2025-11-04 07:29:09 +00:00 
			
		
		
		
	Compare commits
	
		
			2 Commits
		
	
	
		
			pull/582-t
			...
			pull/636-v
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					55190ffb42 | ||
| 
						 | 
					81054a2b13 | 
							
								
								
									
										3
									
								
								.gitmodules
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.gitmodules
									
									
									
									
										vendored
									
									
								
							@@ -7,3 +7,6 @@
 | 
			
		||||
[submodule "modules/completion/external"]
 | 
			
		||||
	path = modules/completion/external
 | 
			
		||||
	url = https://github.com/zsh-users/zsh-completions.git
 | 
			
		||||
[submodule "modules/opp/external"]
 | 
			
		||||
	path = modules/opp/external
 | 
			
		||||
	url = https://github.com/hchbaw/opp.zsh.git
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										19
									
								
								modules/opp/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								modules/opp/README.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,19 @@
 | 
			
		||||
VIM text objects
 | 
			
		||||
========================
 | 
			
		||||
 | 
			
		||||
Integrates [opp][1] into Prezto, which implements [vim text objects][2] right into vim mode of prezto.
 | 
			
		||||
 | 
			
		||||
Due to some conflicts with prezto loading, opp will get compiled during initial run.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Authors
 | 
			
		||||
-------
 | 
			
		||||
 | 
			
		||||
*The authors of this module should be contacted via the [issue tracker][3].*
 | 
			
		||||
 | 
			
		||||
  - [Takeshi Banse](https://github.com/hchbaw)
 | 
			
		||||
 | 
			
		||||
[1]: https://github.com/hchbaw/opp.zsh
 | 
			
		||||
[2]: http://blog.carbonfive.com/2011/10/17/vim-text-objects-the-definitive-guide/
 | 
			
		||||
[3]: https://github.com/hchbaw/opp.zsh/issues?state=open
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										20
									
								
								modules/opp/init.zsh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								modules/opp/init.zsh
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,20 @@
 | 
			
		||||
# Vim's text-objects-ish for zsh.
 | 
			
		||||
 | 
			
		||||
# Author: Takeshi Banse <takebi@laafc.net>
 | 
			
		||||
# License: Public Domain
 | 
			
		||||
 | 
			
		||||
# Thank you very much, Bram Moolenaar!
 | 
			
		||||
# I want to use the Vim's text-objects in zsh.
 | 
			
		||||
if [[ ! -f ${0:h}/functions/opp.zwc ]] ||
 | 
			
		||||
   [[ ! -f ${0:h}/functions/opp-install.zwc ]]; then
 | 
			
		||||
  (
 | 
			
		||||
    . "${0:h}/external/opp.zsh"
 | 
			
		||||
    . "${0:h}/external/opp/surround.zsh"
 | 
			
		||||
    . "${0:h}/external/opp/textobj-between.zsh"
 | 
			
		||||
    opp-zcompile "${0:h}/external/opp.zsh" ${0:h}/functions > /dev/null
 | 
			
		||||
  )
 | 
			
		||||
  fpath+=${0:h}/functions > /dev/null
 | 
			
		||||
  . ${0:h}/functions/opp-install
 | 
			
		||||
  autoload opp
 | 
			
		||||
fi
 | 
			
		||||
opp-install
 | 
			
		||||
@@ -20,25 +20,15 @@ following line to *zpreztorc*:
 | 
			
		||||
 | 
			
		||||
    zstyle ':prezto:module:tmux:auto-start' remote 'yes'
 | 
			
		||||
 | 
			
		||||
In both cases the tmux server will be started and a background session
 | 
			
		||||
named _prezto_ will be created if a session doesn't already exist.
 | 
			
		||||
In both cases, it will create a background session named _prezto_ if the tmux
 | 
			
		||||
server is not started.
 | 
			
		||||
 | 
			
		||||
By default every shell shares a set of windows but has an independent
 | 
			
		||||
view. Detaching from one of these sessions removes the view but the
 | 
			
		||||
open windows persist. This is accomplished by setting the
 | 
			
		||||
`destroy-unattached` option to `on` for each session.
 | 
			
		||||
 | 
			
		||||
Some users prefer that all new shells share the same session so that
 | 
			
		||||
the view for each shell is in sync. This useful for advanced users
 | 
			
		||||
that create multiple sessions and want to manually navigate between
 | 
			
		||||
them. To accomplish this behavior set the `mode` option to `shared` in
 | 
			
		||||
*zpreztorc*,
 | 
			
		||||
 | 
			
		||||
    zstyle ':prezto:module:tmux:auto-start' mode shared
 | 
			
		||||
 | 
			
		||||
You can customize the background session by creating a new session in
 | 
			
		||||
your `.tmux.conf` file.
 | 
			
		||||
With `auto-start` enabled, you may want to control how multiple sessions are
 | 
			
		||||
managed. The `destroy-unattached` option of tmux controls if the unattached
 | 
			
		||||
sessions must be kept alive, making sessions available for later use, configured
 | 
			
		||||
in *tmux.conf*:
 | 
			
		||||
 | 
			
		||||
    set-option -g destroy-unattached [on | off]
 | 
			
		||||
 | 
			
		||||
Aliases
 | 
			
		||||
-------
 | 
			
		||||
 
 | 
			
		||||
@@ -25,21 +25,14 @@ if [[ -z "$TMUX" && -z "$EMACS" && -z "$VIM" ]] && ( \
 | 
			
		||||
 | 
			
		||||
  # Create a 'prezto' session if no session has been defined in tmux.conf.
 | 
			
		||||
  if ! tmux has-session 2> /dev/null; then
 | 
			
		||||
    tmux_session='prezto'
 | 
			
		||||
    tmux \
 | 
			
		||||
      new-session -d -s prezto \; \
 | 
			
		||||
      set-option -t prezto destroy-unattached off &> /dev/null
 | 
			
		||||
  else
 | 
			
		||||
    tmux_session
 | 
			
		||||
      new-session -d -s "$tmux_session" \; \
 | 
			
		||||
      set-option -t "$tmux_session" destroy-unattached off &> /dev/null
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  if zstyle -t ':prezto:module:tmux:auto-start' mode shared; then
 | 
			
		||||
      # Attach to the 'prezto' session or to the last session used.
 | 
			
		||||
      exec tmux attach
 | 
			
		||||
  else
 | 
			
		||||
      # Find a session to share windows with.
 | 
			
		||||
      tmux_session=`tmux list-sessions -F '#S' | head -n 1`
 | 
			
		||||
      exec tmux new-session -t "$tmux_session"\; set-option destroy-unattached on
 | 
			
		||||
  fi
 | 
			
		||||
  # Attach to the 'prezto' session or to the last session used.
 | 
			
		||||
  exec tmux attach-session
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user