Skip to content
Browse files

Fix auto-opening up templates

  • Loading branch information...
1 parent 4aeb34a commit 2b4975085db4a4bc019481c65cabfbddb7a141de @Funkmyster committed
Showing with 6 additions and 1 deletion.
  1. +6 −1 plugin/chef.vim
View
7 plugin/chef.vim
@@ -10,10 +10,15 @@ import vim
current_file = vim.current.buffer.name
file_array = current_file.split('/')
-file_array_buff = current_file.split('/')
def window_split_replace(item):
+ file_array_buff = current_file.split('/')
file_array_buff[-2] = item
+
+ if item == 'templates':
+ loc = file_array_buff[-1].split('.')[0]
+ file_array_buff[-1] = "{0}/".format(loc)
+
new_file = "/".join(file_array_buff)
cmd = "split {0}".format(new_file)
vim.command(cmd)

0 comments on commit 2b49750

Please sign in to comment.
Something went wrong with that request. Please try again.