lib/repl.rb in runeblog-0.2.83 vs lib/repl.rb in runeblog-0.2.84
- old
+ new
@@ -274,9 +274,12 @@
if arg.nil?
arg = ask("\nFilename: ")
puts
end
@blog.create_view(arg)
+ text = File.read("#{@blog.root}/data/global.lt3")
+ File.write("#{@blog.root}/views/#{@blog.view}/themes/standard/global.lt3",
+ text.gsub(/VIEW_NAME/, @blog.view.to_s))
vim_params = '-c ":set hlsearch" -c ":hi Search ctermfg=2 ctermbg=6" +/"\(VIEW_.*\|SITE.*\)"'
edit_file(@blog.view.dir/"themes/standard/global.lt3", vim: vim_params)
@blog.change_view(arg)
@out
rescue ViewAlreadyExists